...
Currently, several types of messages are supported: with buttons, without buttons, file, picture, and location. The type is specified in the type parameter. If the message type is push-button, it may also contain text that comes before the buttons.
Request specification
Name | Description | Data type | Comments |
---|---|---|---|
channel_id | Channel Id in Creatio | string | |
receiver_id | Id of user, tat receives messages in your channel | string | |
type | Type of message sent | string | text, buttons, file, image, location, operator_info |
content | Buttons sent | Content |
Specification of Content class
Name | Description | Data type | Comments |
---|---|---|---|
text | Text before buttons | string | f the message type is a file or picture, then a link to the file or picture. If location, then location object |
buttons | Buttons text | string[] | |
operatorInfo | Information about operator | OperatorInfo | If the request type is operator_info |
Specification of Location class
Name | Description | Data type | Comments |
---|---|---|---|
lat | Latitude | string | |
lng | Longtitude | string |
Specification of OperatorInfo class
Name | Describtion | Date type | Comments |
OperatorPhotoLink | Link to the operator’s photo | string | |
OperatorName | Operator name | string |
For correct operation, you must return 200 OK for each request to your Endpoint.
...
If the channel settings are ticked "Send information about the operator", then an operator_info type message will be sent.
An example of a received JSON message with text type
Code Block | ||
---|---|---|
| ||
{ "channel_id" : "28528776-3130-4C66-E811-08D55CEAB346", "receiver_id" : "123", "type" : "text", "content" : { "text" : "test", "buttons" : [] }, "operatorInfo": "" } |