Unarchive a Message Session

Unarchive a message session.

Request URL

POST {base_url}/{api_path}/message_session/unarchive?access_token={access_token}

Request parameters

Parameter Required Type Description
session_id Yes Integer The unique ID of the message session.
Note: You can query the message session ID using Search Specific Message Sessions.
user_type Yes Integer The type of the operator who unarchives the message session.
Valid value:
  • 1: Extension user.
  • 9: Third-party message analytics platform.
user_no No String The unique ID of the operator who unarchives the message session.
Valid value:
  • If user_type is set to 1, this parameter is REQUIRED and is used to specify the corresponding ID of the extension user.
    Note: You can query the extension ID using Search Specific Extensions.
  • If user_type is set to 9, set the value to api or leave it empty.

Response parameters

Table 1.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Examples

Request example

Unachive a message session (ID: 3073) for extension 1004.

POST /openapi/v1.0/message_session/unarchive?access_token=PLpSKjhDXAEFgKMJP3VxvJD1kLoiApp1 HTTP/1.1
Host: 192.168.5.150:8088

Content-Type: application/json

{
    "session_id": 3073,
    "user_type": 1,
    "user_no":"1004" 
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}