Create a Message
This endpoint allows you to create a new message in a conversation.
Settings:
URL | https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages |
Method | JSON via POST |
Authorization:
Header Parameter | Description |
api_access_token | user API key |
The user API key provides access to endpoints based on the user permissions levels and can be obtained by visiting the profile page.
Path Parameters:
Parameter | Description | Required |
account_id | The numeric id of the account | yes |
conversation_id | The numeric id of the account | yes |
Request body:
Parameter | type | Description | Required |
content | string | The content of the message | yes |
message_type | string | The type of the message Enum: | no |
private | boolean | A Boolean indicating whether the message is private or not | no |
content_type | string | The type of the template message Enum: | no |
content_attributes | object | Attributes based on the message content type | no |
Request body example:
{
"content": "string",
"message_type": "outgoing",
"private": false,
"content_type": "text",
"content_attributes": {}
}
Response:
{
"id": 0,
"content": "string",
"inbox_id": 0,
"conversation_id": 0,
"message_type": 0,
"content_type": "text",
"status": "sent",
"content_attributes": {},
"created_at": 0,
"private": false,
"source_id": "string",
"sender": {
"id": 0,
"name": "string",
"available_name": "string",
"email": "string",
"avatar_url": "string",
"logo_user_url": "string",
"type": "user",
"availability_status": "offline",
"thumbnail": "string"
},
"created_at_exact": "yyyy-mm-ddThh:mm:ss.sssZ"
}
Response-Explain:
Parameter | Description |
id | The numeric id of the message |
content | The message text content |
inbox_id | The numeric id of the inbox |
conversation_id | The numeric id of the conversation |
message_type | The type of the message 1 - incoming 2 - outgoing 3 - activity 4 - template |
content_type | The type of the template message Enum: Default: |
status | The status of the message Enum: |
content_attributes | An object containing content attributes for the content_type |
created_at | Time at which the message was created. Measured in seconds since the Unix epoch. |
private | A Boolean indicating whether the message is private or not |
source_id | Message source id |
created_at_exact | The time at which message was created (ISO 8601 format) |
sender | An object containing sender data (contact \ user \ agent_bot) |