Sending messages
If you want your service to send messages to Creatio using Beesender, you need to enable message sending in JSON-format for your service.
The address of the connector is a host, which is used when communicating from Creatio. You can find this value in the system setting BeesenderOperatoHost.
The type parameter defines the type of sending message: text, image, file, location. If type == 'text', the text field must be filled in. Same for the rest of types.
SendMessage
Description | Interface for sending messages to Creatio using Beesender |
Path | {HOST}/api/v1.0/sendmessage/{Appid}/{ChannelId} |
Method type | POST |
AppId – your secret key
ChannelId – guid, recieved in test hook
Â
Request Specification
Name | Description | Data type | Required | Comments |
---|---|---|---|---|
sender | Sender | Sender | yes | Â |
message | Message | Message | yes | Â |
clientId | Client identificator | string | no | Â |
Class structure Sender
Name | Description | Data type | Required | Comments |
---|---|---|---|---|
id | Your system’s User Id | string | yes |  |
name | Name of your system’s user | string | yes |  |
avatar | Your system’s user avatar link | string | yes |  |
Class structure Message
Name | Description | Data type | Required | Comments |
---|---|---|---|---|
type | Message type | string | yes | Possible values: text, image, file, location |
text | Message text | string | Â | Â |
attachment | Attachment | Attachment | Â | Â |
Class structure Attachment
Name | Description | Data type | Required | Comments |
---|---|---|---|---|
image | Image link | string | Â | Â |
location | Location | Location | Â | Â |
file | File | File | Â | Â |
Class structure Location
Name | Description | Data type | Required | Comments |
---|---|---|---|---|
lat | Latitude | string | Â | Â |
lng | Latitude | string | Â | Â |
Class structure File
Name | Description | Data type | Required | Comments |
---|---|---|---|---|
name | File name | string | Â | Â |
size | File size | long | Â | In bytes. Not used yet |
url | File url | string | Â | Â |
Text message sample sent to Creatio
{
 "sender":
{
 "id": 4,
   "name": "Alex Wilson",
 "avatar": "https://media.fox9.com/media.fox9.com/photo/116.png_360.jpg"
},
 "message":
{
   "type": "text",
    "text": "Test text"
  }
}
If the request was successful, then 200 OK is returned with the body, for example,
{
   "ok": true
}
If there are errors, then the text of the error will be indicated in the response body, for example,
{
   "ok": false,
   "error": "hook.message.attachment.image can't be empty"
}
Â
Â
Â
Â