Messaging
Outgoing Messages
SendMessage
Send SMS message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Messaging",
"action": "SendMessage"
}
},
"payload": {
"token": {{String}},
"message": {{String}},
"recipients": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
token |
String |
Yes |
Token id for send message request. |
|
message |
String |
Yes |
Body of the SMS text message to be sent. |
|
recipients |
String |
Yes |
String in JSON format containing the recipient of the SMS message. |
|
UpdateMessagesStatus
Update status of SMS messages.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Messaging",
"action": "UpdateMessagesStatus"
}
},
"payload": {
"token": {{String}},
"conversationId": {{String}},
"status": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
token |
String |
Yes |
Token id for send message request. |
|
conversationId |
String |
Yes |
The id of the conversation whose messages need to be updated. |
|
status |
String |
Yes |
String in JSON format representing the message ids and status to be updated. |
|
UploadConversations
Upload SMS unread messages message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Messaging",
"action": "UploadConversations"
}
},
"payload": {
"token": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
token |
String |
Yes |
Token id for send message request. |
|
Incoming Messages
UpdateMessagesStatusFailed
Notifies the Engine the message status update failed.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Messaging",
"action": "UpdateMessagesStatusFailed"
}
},
"payload": {
"token": {{String}},
"code": {{ErrorCode}},
"message": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
token |
String |
Yes |
Token id for send message request. |
|
code |
ErrorCode |
Yes |
The error code identifying the failure. |
|
message |
String |
No |
The message explaining the error. |
|
UpdateMessagingEndpointState
Notifies the Engine of updates to the messaging endpoint state.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Messaging",
"action": "UpdateMessagingEndpointState"
}
},
"payload": {
"connectionState": {{ConnectionState}},
"sendPermission": {{PermissionState}},
"readPermission": {{PermissionState}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
connectionState |
ConnectionState |
Yes |
The value for the connection state. |
|
sendPermission |
PermissionState |
Yes |
The value for the send permission. |
|
readPermission |
PermissionState |
Yes |
The value for the read permission. |
|
SendMessageSucceeded
Notifies the Engine that message send was successful.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Messaging",
"action": "SendMessageSucceeded"
}
},
"payload": {
"token": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
token |
String |
Yes |
Token id for send message request. |
|
SendMessageFailed
Notifies the Engine the message send failed.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Messaging",
"action": "SendMessageFailed"
}
},
"payload": {
"token": {{String}},
"code": {{ErrorCode}},
"message": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
token |
String |
Yes |
Token id for send message request. |
|
code |
ErrorCode |
Yes |
The error code identifying the failure. |
|
message |
String |
No |
The message explaining the error. |
|
ConversationsReport
Notifies the Engine to upload conversations report to the cloud.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Messaging",
"action": "ConversationsReport"
}
},
"payload": {
"token": {{String}},
"conversations": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
token |
String |
Yes |
Token id for send message request. |
|
conversations |
String |
Yes |
String in JSON format representing all conversations with unread SMS messages. |
|
UpdateMessagesStatusSucceeded
Notifies the Engine that message status was successful.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Messaging",
"action": "UpdateMessagesStatusSucceeded"
}
},
"payload": {
"token": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
token |
String |
Yes |
Token id for send message request. |
|
Enums
ConnectionState
Values
Value |
Description |
"DISCONNECTED" |
Messaging device is disconnected. |
"CONNECTED" |
Messaging device is connected. |
PermissionState
Values
Value |
Description |
"OFF" |
Permission is not granted. |
"ON" |
Permission is granted. |
ErrorCode
Values
Value |
Description |
"GENERIC_FAILURE" |
Generic error handling SMS request. |
"NO_CONNECTIVITY" |
Messaging device is not connected. |
"NO_PERMISSION" |
Permission denied. |