Contents
- Introduction
- API Methods
- General Information
- Check Availability
- Expected Parameters
- 1 Request Chat
- Request SMS Chat Session
- Get Active Chat
- Send Events
- Get Chat History
- Get New Chat Events
- Upload File
- Get File
- Get Agent Profile Photo
- API Events
Request Chat
Description | Initiates a chat session. Provides values of all or some of the expected parameters. May also contain the phone number of the mobile device. Depending on the scenario entry configuration, a call back can be initiated automatically to the specified number as soon as the chat request is delivered to the agent.
Note that if the mobile/web scenario entry is not configured for automatic callback, the agent can still use this number to call the mobile user manually, either upon his own initiative or when asked to do this via a chat message from the mobile user. Parameter from may be used to specify either the device owner’s name or phone number. It will be placed in the scenario variable $(item.from). |
URL | http[s]://<host>:<port>/clientweb/api/v1/chats?tenantUrl=<tenantUrl> |
Method | POST |
Request body | Names and values of record fields (content type: application/json). Example:
{ “phone_number”:”phone number for callback, if necessary”, } |
Returns | 200 – Chat session properties (content type: application/json). Example:
{ "chat_id":”<chat ID>”, “state”: “<queued|connected|ivr>”, } |
Errors | 400 – Bad request
{ "error_code": <error code>, “error_message”:”<error message>” } 401 – Unauthorized |