Returns a list of channels
| id | integer <int> >= 1 Identifier of the requested object |
| active | string (Boolean) Enum: "1" "0" "true" "false" Channel activity flag |
| types | Array of strings (ChannelType) Items Enum: "telegram" "tiktok" "fbmessenger" "viber" "whatsapp" "skype" "vk" "instagram" "consultant" "yandex_chat" "odnoklassniki" "max" "ozon" "wildberries" "yandex_market" "mega_market" "avito" "drom" "youla" "custom" Example: types=telegram Channel types |
| since | string <date-time> Lower limit of the date of the last object update |
| until | string <date-time> Upper limit of the date of the last object update |
| limit | integer <int> [ 1 .. 1000 ] The number of elements in the response. Default value is 100 |
| id required | integer <int64> |
| type required | string (ChannelType) Enum: "telegram" "tiktok" "fbmessenger" "viber" "whatsapp" "skype" "vk" "instagram" "consultant" "yandex_chat" "odnoklassniki" "max" "ozon" "wildberries" "yandex_market" "mega_market" "avito" "drom" "youla" "custom" Channel types |
| created_at required | string <date-time> |
| activated_at required | string <date-time> |
| is_active required | boolean |
| external_id | string or null |
| name | string or null |
object or null Channel settings | |
| updated_at | string or null <date-time> |
| deactivated_at | string or null <date-time> |
[- {
- "id": 1,
- "external_id": "ch2847",
- "name": "Example Channel",
- "type": "telegram",
- "is_active": true,
- "settings": {
- "text": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "quoting": "both",
- "reaction": "both",
- "max_chars_count": 0,
- "markup_formats": [
- "bold"
]
}, - "audio": {
- "creating": "both",
- "deleting": "both",
- "quoting": "both",
- "reaction": "both",
- "max_item_size": 0,
- "max_items_count": 0
}, - "file": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "quoting": "both",
- "reaction": "both",
- "max_item_size": 0,
- "max_items_count": 0,
- "note_max_chars_count": 0
}, - "image": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "quoting": "both",
- "reaction": "both",
- "max_item_size": 0,
- "max_items_count": 0,
- "note_max_chars_count": 0
}, - "order": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "reaction": "both",
- "quoting": "both"
}, - "product": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "reaction": "both",
- "quoting": "both"
}, - "customer_external_id": "phone",
- "deferred_phone_template_send": true,
- "sending_policy": {
- "after_reply_timeout": "no",
- "new_customer": "no",
- "outgoing": "allowed"
}, - "status": {
- "delivered": "both",
- "read": "both"
}, - "suggestions": {
- "email": "both",
- "phone": "both",
- "text": "both",
- "url": "both"
}, - "template": {
- "creation": true,
- "sending": true
}, - "whatsapp": {
- "channel_quality": "high",
- "channel_status": "connected",
- "tier": 0
}, - "reactions": {
- "dictionary": [
- "string"
], - "max_count": 0
}
}, - "created_at": "2006-01-02T15:04:05.999999Z07:00",
- "updated_at": "2006-01-02T15:04:05.999999Z07:00",
- "activated_at": "2006-01-02T15:04:05.999999Z07:00",
- "deactivated_at": "2006-01-02T15:04:05.999999Z07:00"
}
]Activates a new channel with set parameters
Channel activation request
| id required | integer <int64> >= 0 Channel identifier |
| type required | string Enum: "telegram" "tiktok" "fbmessenger" "viber" "whatsapp" "skype" "vk" "instagram" "consultant" "yandex_chat" "odnoklassniki" "max" "ozon" "wildberries" "yandex_market" "mega_market" "avito" "drom" "youla" "custom" Channel types |
| external_id | string <= 64 characters External identifier of a channel |
| name | string <= 100 characters Channel name |
| avatar_url | string <uri> <= 255 characters Channel avatar URL |
object (ChannelSettings) Channel settings |
| id required | integer <int64> Channel identifier |
| activated_at required | string <date-time> Date and time of channel activation |
| id required | integer <int64> Channel identifier |
| activated_at required | string <date-time> Date and time of channel activation |
{- "id": 146,
- "external_id": "ac3249",
- "name": "demo channel",
- "settings": {
- "text": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "quoting": "both",
- "reaction": "both",
- "max_chars_count": 0,
- "markup_formats": [
- "bold"
]
}, - "audio": {
- "creating": "both",
- "deleting": "both",
- "quoting": "both",
- "reaction": "both",
- "max_item_size": 0,
- "max_items_count": 0
}, - "file": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "quoting": "both",
- "reaction": "both",
- "max_item_size": 0,
- "max_items_count": 0,
- "note_max_chars_count": 0
}, - "image": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "quoting": "both",
- "reaction": "both",
- "max_item_size": 0,
- "max_items_count": 0,
- "note_max_chars_count": 0
}, - "order": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "reaction": "both",
- "quoting": "both"
}, - "product": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "reaction": "both",
- "quoting": "both"
}, - "customer_external_id": "phone",
- "deferred_phone_template_send": true,
- "sending_policy": {
- "after_reply_timeout": "no",
- "new_customer": "no",
- "outgoing": "allowed"
}, - "status": {
- "delivered": "both",
- "read": "both"
}, - "suggestions": {
- "email": "both",
- "phone": "both",
- "text": "both",
- "url": "both"
}, - "template": {
- "creation": true,
- "sending": true
}, - "whatsapp": {
- "channel_quality": "high",
- "channel_status": "connected",
- "tier": 0
}, - "reactions": {
- "dictionary": [
- "string"
], - "max_count": 0
}
}, - "type": "telegram"
}{- "id": 34,
- "activated_at": "2006-01-02T15:04:05Z07:00"
}Deactivates an existing channel
| channel_id required | integer <int64> Channel identifier |
| id required | integer <int64> Identifier of the deactivated channel |
| deactivated_at required | string <date-time> Date and time of channel deactivation |
{- "id": 34,
- "deactivated_at": "2006-01-02T15:04:05Z07:00"
}Updating parameters of an existing channel
| channel_id required | integer <int64> Channel identifier |
Channel update request
| external_id | string <= 64 characters External identifier |
| name | string <= 100 characters Channel name |
| avatar_url | string <= 255 characters Channel avatar URL |
object (ChannelSettings) Channel settings | |
| type | string Enum: "telegram" "tiktok" "fbmessenger" "viber" "whatsapp" "skype" "vk" "instagram" "consultant" "yandex_chat" "odnoklassniki" "max" "ozon" "wildberries" "yandex_market" "mega_market" "avito" "drom" "youla" "custom" Channel types |
| id required | integer <int64> Channel identifier |
| updated_at required | string <date-time> Date and time of last update |
{- "external_id": "ac3249",
- "name": "demo channel",
- "settings": {
- "text": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "quoting": "both",
- "reaction": "both",
- "max_chars_count": 0,
- "markup_formats": [
- "bold"
]
}, - "audio": {
- "creating": "both",
- "deleting": "both",
- "quoting": "both",
- "reaction": "both",
- "max_item_size": 0,
- "max_items_count": 0
}, - "file": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "quoting": "both",
- "reaction": "both",
- "max_item_size": 0,
- "max_items_count": 0,
- "note_max_chars_count": 0
}, - "image": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "quoting": "both",
- "reaction": "both",
- "max_item_size": 0,
- "max_items_count": 0,
- "note_max_chars_count": 0
}, - "order": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "reaction": "both",
- "quoting": "both"
}, - "product": {
- "creating": "both",
- "deleting": "both",
- "editing": "both",
- "reaction": "both",
- "quoting": "both"
}, - "customer_external_id": "phone",
- "deferred_phone_template_send": true,
- "sending_policy": {
- "after_reply_timeout": "no",
- "new_customer": "no",
- "outgoing": "allowed"
}, - "status": {
- "delivered": "both",
- "read": "both"
}, - "suggestions": {
- "email": "both",
- "phone": "both",
- "text": "both",
- "url": "both"
}, - "template": {
- "creation": true,
- "sending": true
}, - "whatsapp": {
- "channel_quality": "high",
- "channel_status": "connected",
- "tier": 0
}, - "reactions": {
- "dictionary": [
- "string"
], - "max_count": 0
}
}, - "type": "telegram"
}{- "id": 23,
- "updated_at": "2006-01-02T15:04:05Z07:00"
}Uploads a file to the repository and returns information about it
| id required | string <uuid> UUID of the uploaded file |
| type required | string (FileType) Enum: "none" "image" "video" "file" "audio" File type |
| size required | integer <int> File size (in bytes) |
| Url | string <uri> Deprecated File download URL (legacy, use |
| url | string <uri> File download URL |
| mime_type | string MIME file type |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "size": 640,
- "mime_type": "text/plain",
- "type": "file"
}Uploads a file from external sources by URL
Upload file by URL
| url required | string <uri> Upload source URL |
| id required | string <uuid> UUID of the uploaded file |
| type required | string (FileType) Enum: "none" "image" "video" "file" "audio" File type |
| size required | integer <int> File size (in bytes) |
| Url | string <uri> Deprecated File download URL (legacy, use |
| url | string <uri> File download URL |
| mime_type | string MIME file type |
{
}{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "size": 640,
- "mime_type": "text/plain",
- "type": "file"
}Returns information about the file by its UUID
| id required | string File UUID |
| id required | string <uuid> UUID of the uploaded file |
| type required | string (FileType) Enum: "none" "image" "video" "file" "audio" File type |
| size required | integer <int> File size (in bytes) |
| Url | string <uri> Deprecated File download URL (legacy, use |
| url | string <uri> File download URL |
| mime_type | string MIME file type |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "size": 640,
- "mime_type": "text/plain",
- "type": "file"
}Activates a new message template for the channel
| channel_id required | integer <int64> Channel identifier |
Request to activate a new template
| name required | string or null [ 1 .. 512 ] characters Template name |
| code required | string [ 1 .. 512 ] characters Template unique code |
| type required | string Enum: "text" "media" Template type |
| body | string or null Template body |
object (TemplateButtons) List of template buttons | |
| category | string Template category |
| footer | string Template footer |
object (TemplateHeader) Header section of the template | |
| lang | string Template language |
| rejection_reason | string Enum: "abusive_content" "incorrect_category" "invalid_format" "scam" Reason for template rejection (for |
| verification_status | string Enum: "approved" "pending" "rejected" "paused" "disabled" Template verification status |
Array of objects or null (TemplateItem) | |
| quality | string Enum: "pending" "high" "medium" "low" Template quality |
{- "body": "Hello {{1}}! Your order #{{2}} for the amount of ${{3}} has been delivered to the pickup point. Thank you for your order!",
- "buttons": {
- "items": [
- {
- "label": "Click me",
- "type": "plain"
}, - {
- "label": "Call us",
- "type": "phone",
- "phone": "+1234567890"
},
]
}, - "category": "MARKETING",
- "footer": "foo bar",
- "header": {
- "content": {
- "type": "text",
- "body": "string"
}
}, - "lang": "en",
- "name": "test template",
- "rejection_reason": "invalid_format",
- "verification_status": "approved",
- "template": [
- {
- "type": 1,
- "text": "string",
- "var": 0
}
], - "quality": "pending",
- "code": "DEMO_TEMPLATE",
- "type": "text"
}{ }Deactivates an existing message template for the channel
| channel_id required | integer <int64> Channel identifier |
| template_code required | string Template code |
{ }Updates an existing message template for the channel
| channel_id required | integer <int64> Channel identifier |
| template_code required | string Template code |
Request to update an existing template
| name required | string or null [ 1 .. 512 ] characters Template name |
| verification_status required | string Enum: "approved" "pending" "rejected" "paused" "disabled" Template verification status |
| body | string or null Template body |
object (TemplateButtons) List of template buttons | |
| category | string Template category |
| footer | string Template footer |
object (TemplateHeader) Header section of the template | |
| lang | string Template language |
| rejection_reason | string Enum: "abusive_content" "incorrect_category" "invalid_format" "scam" Reason for template rejection (for |
Array of objects or null (TemplateItem) | |
| quality | string Enum: "pending" "high" "medium" "low" Template quality |
{- "body": "Hello {{1}}! Your order #{{2}} for the amount of ${{3}} has been delivered to the pickup point. Thank you for your order!",
- "buttons": {
- "items": [
- {
- "label": "Click me",
- "type": "plain"
}, - {
- "label": "Call us",
- "type": "phone",
- "phone": "+1234567890"
},
]
}, - "category": "MARKETING",
- "footer": "foo bar",
- "header": {
- "content": {
- "type": "text",
- "body": "string"
}
}, - "lang": "en",
- "name": "test template",
- "rejection_reason": "invalid_format",
- "verification_status": "approved",
- "template": [
- {
- "type": 1,
- "text": "string",
- "var": 0
}
], - "quality": "pending"
}{ }Returns a list of available message templates for this transport
| id required | integer or null <int64> Template identifier |
| code required | string or null [ 1 .. 512 ] characters Template unique code |
| channel_id required | integer or null <int64> Channel identifier |
| name required | string or null [ 1 .. 512 ] characters Template name |
| enabled required | boolean or null Template activity indicator |
| type required | string Enum: "text" "media" Template type |
| body required | string or null Template body |
| verification_status required | string Enum: "approved" "pending" "rejected" "paused" "disabled" Template verification status |
object (TemplateButtons) List of template buttons | |
| category | string Template category |
| footer | string Template footer |
object (TemplateHeader) Header section of the template | |
| lang | string Template language |
| rejection_reason | string Enum: "abusive_content" "incorrect_category" "invalid_format" "scam" Reason for template rejection (for |
Array of objects or null (TemplateItem) | |
| quality | string Enum: "pending" "high" "medium" "low" Template quality |
object (TemplateExample) Template example |
[- {
- "body": "Hello {{1}}! Your order #{{2}} for the amount of ${{3}} has been delivered to the pickup point. Thank you for your order!",
- "buttons": {
- "items": [
- {
- "label": "Click me",
- "type": "plain"
}, - {
- "label": "Call us",
- "type": "phone",
- "phone": "+1234567890"
},
]
}, - "category": "MARKETING",
- "footer": "foo bar",
- "header": {
- "content": {
- "type": "text",
- "body": "string"
}
}, - "lang": "en",
- "name": "test template",
- "rejection_reason": "invalid_format",
- "verification_status": "approved",
- "template": [
- {
- "type": 1,
- "text": "string",
- "var": 0
}
], - "quality": "pending",
- "id": 12,
- "channel_id": 34,
- "enabled": true,
- "example": {
- "attachments": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "caption": "string"
}
], - "body": [
- "Max",
- "e3459",
- "328"
], - "buttons": [
- [
- "string"
]
], - "header": [
- "Alex"
]
}, - "code": "DEMO_TEMPLATE",
- "type": "text"
}
]Deletes the created message if the channel supports such an operation
Request for delete message
required | object Message identifier |
| channel required | integer <int64> Channel identifier |
| action required | string (SystemAction) Enum: "dialog_opened" "dialog_closed" "user_joined" "user_left" "dialog_assign" "customer_blocked" "customer_unblocked" "dialog_unassign" "dialog_tag_added" "dialog_tag_removed" System action of the message (for system type messages only) |
| id required | integer <int64> Message identifier |
| time required | string <date-time> Message creation time |
| type required | string (MessageType) Enum: "text" "system" "command" "order" "product" "file" "image" "audio" Message type |
| scope required | string (MessageScope) Enum: "undefined" "public" "private" Message scope |
| chat_id required | integer <int64> Chat identifier |
| is_read required | boolean Message read indicator |
| is_edit required | boolean Message editing indicator |
| status required | string (MessageStatus) Enum: "undefined" "received" "sending" "sent" "failed" "seen" Message status |
| content | string Message text |
object (QuoteMessage) Quoted message | |
object (UserRef) Details about a user | |
object (UserRef) Details about a user | |
| actions | Array of strings (MessageAction) Items Enum: "edit" "delete" "quote" Actions available for this message |
object (MessageDialog) Message dialog | |
object (MessageError) Message error details (only for messages with status | |
object (UserRef) Details about a user | |
Array of objects (MessageFile) | |
| note | string Media data annotation (for media message) |
object (MessageOrder) Represents the details of an order within a message | |
object (MessageProduct) Describes a product mentioned in a message | |
object (MessageTransportAttachments) Transport attachments |
{- "channel": 88,
- "message": {
- "id": 45,
- "external_id": "rm2884"
}
}{- "content": "hi there",
- "quote": {
- "id": 45,
- "content": "quote content",
- "from": {
- "id": 56,
- "available": false,
- "email": "demo@user.demo",
- "external_id": "eid3459",
- "first_name": "John",
- "is_blocked": false,
- "is_system": true,
- "is_technical_account": false,
- "last_name": "Doe",
- "name": "John D.",
- "phone": "541-392-2618",
- "type": "user",
- "username": "johndoe."
}, - "items": [
- {
- "id": "c425d178-eb6f-11ec-8ea0-0242ac120002",
- "caption": "demo caption",
- "duration": 345,
- "size": 34534,
- "height": 1080,
- "width": 1920,
- "histogram": [
- 1,
- 34,
- 23,
- 4,
- 32,
- 34,
- 23,
- 12,
- 93,
- 4
], - "kind": "file",
- "transcription": "Sample transcription",
- "type": "application/pdf"
}
], - "time": "2021-12-29T14:18:41Z",
- "type": "text"
}, - "action": "user_joined",
- "responsible": {
- "id": 56,
- "available": false,
- "email": "demo@user.demo",
- "external_id": "eid3459",
- "first_name": "John",
- "is_blocked": false,
- "is_system": true,
- "is_technical_account": false,
- "last_name": "Doe",
- "name": "John D.",
- "phone": "541-392-2618",
- "type": "user",
- "username": "johndoe."
}, - "user": {
- "id": 56,
- "available": false,
- "email": "demo@user.demo",
- "external_id": "eid3459",
- "first_name": "John",
- "is_blocked": false,
- "is_system": true,
- "is_technical_account": false,
- "last_name": "Doe",
- "name": "John D.",
- "phone": "541-392-2618",
- "type": "user",
- "username": "johndoe."
}, - "id": 45,
- "actions": [
- "edit"
], - "chat_id": 56,
- "dialog": {
- "id": 9
}, - "error": {
- "code": "malformed_response",
- "message": "error malformed response"
}, - "from": {
- "id": 56,
- "available": false,
- "email": "demo@user.demo",
- "external_id": "eid3459",
- "first_name": "John",
- "is_blocked": false,
- "is_system": true,
- "is_technical_account": false,
- "last_name": "Doe",
- "name": "John D.",
- "phone": "541-392-2618",
- "type": "user",
- "username": "johndoe."
}, - "is_edit": false,
- "is_read": true,
- "items": [
- {
- "id": "c425d178-eb6f-11ec-8ea0-0242ac120002",
- "caption": "demo caption",
- "duration": 345,
- "size": 34534,
- "height": 1080,
- "width": 1920,
- "histogram": [
- 1,
- 34,
- 23,
- 4,
- 32,
- 34,
- 23,
- 12,
- 93,
- 4
], - "kind": "file",
- "transcription": "Sample transcription",
- "type": "application/pdf"
}
], - "note": "demo note",
- "order": {
- "external_id": 56,
- "cost": {
- "currency": "str",
- "value": 256
}, - "date": "2021-12-29T14:18:37.051393Z",
- "delivery": {
- "address": "2641 Webster St Berkeley, California(CA), 94705",
- "comment": "demo delivery comment",
- "name": "dhl",
- "price": {
- "currency": "str",
- "value": 256
}
}, - "discount": {
- "currency": "str",
- "value": 256
}, - "items": [
- {
- "external_id": 45,
- "name": "demo order item",
- "price": {
- "currency": "str",
- "value": 256
}, - "quantity": {
- "unit": "pcs",
- "value": 5
},
}
], - "number": "23546",
- "payments": [
- {
- "amount": {
- "currency": "str",
- "value": 256
}, - "name": "paid",
- "status": {
- "name": "demo-payment-status",
- "payed": true
}
}
], - "status": {
- "code": "approval",
- "name": "approval"
},
}, - "product": {
- "id": 56,
- "article": "324-DFT-495",
- "cost": {
- "currency": "str",
- "value": 256
}, - "name": "demo product",
- "unit": "string",
}, - "scope": "public",
- "status": "seen",
- "time": "2022-05-30T22:28:55Z",
- "transport_attachments": {
}, - "type": "text"
}Sends a message
Request for sending message
required | object Defines the message content in a sending request |
| channel required | integer <int64> Channel identifier |
object Contains information about the customer sending a message | |
| external_chat_id | string <= 64 characters External identifier |
| originator | string Enum: "customer" "channel" "user" Message sender type |
object Message identifier | |
| reply_deadline | string <date-time> Deadline for response |
| secondary_external_chat_ids | Array of strings Array of additional external chat identifiers |
object Deprecated Contains information about the customer sending a message |
| message_id required | integer <int64> Identifier of the created message |
| time required | string <date-time> Message creation time |
| warnings | Array of strings Warnings that occurred while creating a message |
{- "channel": 618,
- "customer": {
- "country": "US",
- "email": "customer@customer.demo",
- "external_id": "cs9109",
- "secondary_external_ids": [
- "string"
], - "first_name": "John",
- "language": "en",
- "last_name": "Doe",
- "nickname": "John Doe",
- "phone": "+14844578894",
- "utm": {
- "campaign": "spring_sale",
- "content": "textlink",
- "medium": "cpc",
- "source": "Google",
- "term": "running"
}
}, - "external_chat_id": "c7832",
- "message": {
- "text": "demo text",
- "product": {
- "id": 56,
- "article": "324-DFT-495",
- "cost": {
- "currency": "str",
- "value": 256
}, - "name": "demo product",
- "unit": "string",
}, - "order": {
- "external_id": 56,
- "cost": {
- "currency": "str",
- "value": 256
}, - "date": "2021-12-29T14:18:37.051393Z",
- "delivery": {
- "address": "2641 Webster St Berkeley, California(CA), 94705",
- "comment": "demo delivery comment",
- "name": "dhl",
- "price": {
- "currency": "str",
- "value": 256
}
}, - "discount": {
- "currency": "str",
- "value": 256
}, - "items": [
- {
- "external_id": 45,
- "name": "demo order item",
- "price": {
- "currency": "str",
- "value": 256
}, - "quantity": {
- "unit": "pcs",
- "value": 5
},
}
], - "number": "23546",
- "payments": [
- {
- "amount": {
- "currency": "str",
- "value": 256
}, - "name": "paid",
- "status": {
- "name": "demo-payment-status",
- "payed": true
}
}
], - "status": {
- "code": "approval",
- "name": "approval"
},
}, - "items": [
- {
- "caption": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
], - "note": "string",
- "created_at": "2021-08-02T10:11:12",
- "external_id": "m45418",
- "type": "text"
}, - "originator": "customer",
- "quote": {
- "id": 45,
- "external_id": "rm2884"
}, - "reply_deadline": "2021-08-02T10:11:12",
- "secondary_external_chat_ids": [
- "string"
], - "user": {
- "country": "US",
- "email": "customer@customer.demo",
- "external_id": "cs9109",
- "secondary_external_ids": [
- "string"
], - "first_name": "John",
- "language": "en",
- "last_name": "Doe",
- "nickname": "John Doe",
- "phone": "+14844578894",
- "utm": {
- "campaign": "spring_sale",
- "content": "textlink",
- "medium": "cpc",
- "source": "Google",
- "term": "running"
}
}
}{- "message_id": 34,
- "time": "2021-08-02T10:11:12",
- "warnings": [
- "string"
]
}Modifies the created message if the channel supports such an operation
Request for edit message
required | object (EditMessageRequestMessage) Defines the message content in a editing request |
| channel required | integer <int64> Message channel |
{- "channel": 46,
- "message": {
- "id": 45,
- "external_id": "rm2884",
- "edited_at": 1652767093,
- "text": "Lorem Ipsum"
}
}{ }Sends a history message
Request for send history message
required | object Defines the message content in a sending request |
| channel_id required | integer <int64> Channel identifier |
object Contains information about the customer sending a message | |
| external_chat_id | string <= 64 characters External identifier |
| originator | string Enum: "customer" "channel" "user" Message sender type |
object Message identifier | |
| reply_deadline | string <date-time> Deadline for response |
| message_id required | integer <int64> Identifier of the created message |
| time required | string <date-time> Message creation time |
| warnings | Array of strings Warnings that occurred while creating a message |
{- "channel_id": 618,
- "customer": {
- "country": "US",
- "email": "customer@customer.demo",
- "external_id": "cs9109",
- "secondary_external_ids": [
- "string"
], - "first_name": "John",
- "language": "en",
- "last_name": "Doe",
- "nickname": "John Doe",
- "phone": "+14844578894",
- "utm": {
- "campaign": "spring_sale",
- "content": "textlink",
- "medium": "cpc",
- "source": "Google",
- "term": "running"
}
}, - "external_chat_id": "c7832",
- "message": {
- "text": "demo text",
- "product": {
- "id": 56,
- "article": "324-DFT-495",
- "cost": {
- "currency": "str",
- "value": 256
}, - "name": "demo product",
- "unit": "string",
}, - "order": {
- "external_id": 56,
- "cost": {
- "currency": "str",
- "value": 256
}, - "date": "2021-12-29T14:18:37.051393Z",
- "delivery": {
- "address": "2641 Webster St Berkeley, California(CA), 94705",
- "comment": "demo delivery comment",
- "name": "dhl",
- "price": {
- "currency": "str",
- "value": 256
}
}, - "discount": {
- "currency": "str",
- "value": 256
}, - "items": [
- {
- "external_id": 45,
- "name": "demo order item",
- "price": {
- "currency": "str",
- "value": 256
}, - "quantity": {
- "unit": "pcs",
- "value": 5
},
}
], - "number": "23546",
- "payments": [
- {
- "amount": {
- "currency": "str",
- "value": 256
}, - "name": "paid",
- "status": {
- "name": "demo-payment-status",
- "payed": true
}
}
], - "status": {
- "code": "approval",
- "name": "approval"
},
}, - "items": [
- {
- "caption": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
], - "note": "string",
- "created_at": "2021-08-02T10:11:12",
- "external_id": "m45418",
- "type": "text"
}, - "originator": "customer",
- "quote": {
- "id": 45,
- "external_id": "rm2884"
}, - "reply_deadline": "2021-08-02T10:11:12"
}{- "message_id": 34,
- "time": "2021-08-02T10:11:12",
- "warnings": [
- "string"
]
}Acknowledges delivery status (success or error) of a message in an external system
Request for acknowledging message delivery status
| channel required | integer <int64> Sending channel identifier |
| created_at | string <date-time> Date and time of sending |
object Details about the error that occurred during the sending process | |
object Customer identity resolved by transport while acknowledging a deferred outgoing message | |
object Chat identity resolved by transport while acknowledging a deferred outgoing message | |
| external_message_id | string Deprecated External identifier of a message |
| transport_message_id | string <= 255 characters Message identifier in transport |
object (MessageIdentifier) Message identifier |
{- "channel": 92,
- "created_at": "2021-08-02T10:11:12",
- "error": {
- "code": "customer_not_exists",
- "external_code": "130472",
- "message": "demo message"
}, - "customer": {
- "external_id": "RU.1545487730617822",
- "secondary_external_ids": [
- "string"
], - "phone": "79604598479",
- "first_name": "string",
- "last_name": "string",
- "country": "string",
- "language": "string",
- "email": "user@example.com"
}, - "chat": {
- "external_id": "RU.1545487730617822",
- "secondary_external_ids": [
- "string"
]
}, - "external_message_id": "em3948",
- "transport_message_id": "ydi73-end72-lkmxd-k2en8-827bs",
- "message": {
- "id": 45,
- "external_id": "rm2884"
}
}{ }Marks all messages in the chat as read up to the specified message
Request for mark message read
required | object Message identifier |
| channel_id required | integer <int64> Identifier of the sending channel |
{- "channel_id": 92,
- "message": {
- "id": 45,
- "external_id": "rm2884"
}
}{ }Marks all messages in the channel as read until the specified timestamp
Request for mark message read until some datetime
| customer_external_id required | string Customer external identifier |
| channel_id required | integer <int64> >= 1 Channel identifier |
| until required | string <date-time> Read until date |
| ids required | Array of integers <int64> [ items <int64 > ] Identifiers of messages marked as read |
{- "channel_id": 145,
- "customer_external_id": "cs9109",
- "until": "2022-10-15T23:20:50.52Z"
}{- "ids": [
- 0
]
}Restores a previously deleted message and returns it
Request for restore message
required | object Message identifier |
| channel_id required | integer <int64> Identifier of the sending channel |
| action required | string (SystemAction) Enum: "dialog_opened" "dialog_closed" "user_joined" "user_left" "dialog_assign" "customer_blocked" "customer_unblocked" "dialog_unassign" "dialog_tag_added" "dialog_tag_removed" System action of the message (for system type messages only) |
| id required | integer <int64> Message identifier |
| time required | string <date-time> Message creation time |
| type required | string (MessageType) Enum: "text" "system" "command" "order" "product" "file" "image" "audio" Message type |
| scope required | string (MessageScope) Enum: "undefined" "public" "private" Message scope |
| chat_id required | integer <int64> Chat identifier |
| is_read required | boolean Message read indicator |
| is_edit required | boolean Message editing indicator |
| status required | string (MessageStatus) Enum: "undefined" "received" "sending" "sent" "failed" "seen" Message status |
| content | string Message text |
object (QuoteMessage) Quoted message | |
object (UserRef) Details about a user | |
object (UserRef) Details about a user | |
| actions | Array of strings (MessageAction) Items Enum: "edit" "delete" "quote" Actions available for this message |
object (MessageDialog) Message dialog | |
object (MessageError) Message error details (only for messages with status | |
object (UserRef) Details about a user | |
Array of objects (MessageFile) | |
| note | string Media data annotation (for media message) |
object (MessageOrder) Represents the details of an order within a message | |
object (MessageProduct) Describes a product mentioned in a message | |
object (MessageTransportAttachments) Transport attachments |
{- "channel_id": 92,
- "message": {
- "id": 45,
- "external_id": "rm2884"
}
}{- "content": "hi there",
- "quote": {
- "id": 45,
- "content": "quote content",
- "from": {
- "id": 56,
- "available": false,
- "email": "demo@user.demo",
- "external_id": "eid3459",
- "first_name": "John",
- "is_blocked": false,
- "is_system": true,
- "is_technical_account": false,
- "last_name": "Doe",
- "name": "John D.",
- "phone": "541-392-2618",
- "type": "user",
- "username": "johndoe."
}, - "items": [
- {
- "id": "c425d178-eb6f-11ec-8ea0-0242ac120002",
- "caption": "demo caption",
- "duration": 345,
- "size": 34534,
- "height": 1080,
- "width": 1920,
- "histogram": [
- 1,
- 34,
- 23,
- 4,
- 32,
- 34,
- 23,
- 12,
- 93,
- 4
], - "kind": "file",
- "transcription": "Sample transcription",
- "type": "application/pdf"
}
], - "time": "2021-12-29T14:18:41Z",
- "type": "text"
}, - "action": "user_joined",
- "responsible": {
- "id": 56,
- "available": false,
- "email": "demo@user.demo",
- "external_id": "eid3459",
- "first_name": "John",
- "is_blocked": false,
- "is_system": true,
- "is_technical_account": false,
- "last_name": "Doe",
- "name": "John D.",
- "phone": "541-392-2618",
- "type": "user",
- "username": "johndoe."
}, - "user": {
- "id": 56,
- "available": false,
- "email": "demo@user.demo",
- "external_id": "eid3459",
- "first_name": "John",
- "is_blocked": false,
- "is_system": true,
- "is_technical_account": false,
- "last_name": "Doe",
- "name": "John D.",
- "phone": "541-392-2618",
- "type": "user",
- "username": "johndoe."
}, - "id": 45,
- "actions": [
- "edit"
], - "chat_id": 56,
- "dialog": {
- "id": 9
}, - "error": {
- "code": "malformed_response",
- "message": "error malformed response"
}, - "from": {
- "id": 56,
- "available": false,
- "email": "demo@user.demo",
- "external_id": "eid3459",
- "first_name": "John",
- "is_blocked": false,
- "is_system": true,
- "is_technical_account": false,
- "last_name": "Doe",
- "name": "John D.",
- "phone": "541-392-2618",
- "type": "user",
- "username": "johndoe."
}, - "is_edit": false,
- "is_read": true,
- "items": [
- {
- "id": "c425d178-eb6f-11ec-8ea0-0242ac120002",
- "caption": "demo caption",
- "duration": 345,
- "size": 34534,
- "height": 1080,
- "width": 1920,
- "histogram": [
- 1,
- 34,
- 23,
- 4,
- 32,
- 34,
- 23,
- 12,
- 93,
- 4
], - "kind": "file",
- "transcription": "Sample transcription",
- "type": "application/pdf"
}
], - "note": "demo note",
- "order": {
- "external_id": 56,
- "cost": {
- "currency": "str",
- "value": 256
}, - "date": "2021-12-29T14:18:37.051393Z",
- "delivery": {
- "address": "2641 Webster St Berkeley, California(CA), 94705",
- "comment": "demo delivery comment",
- "name": "dhl",
- "price": {
- "currency": "str",
- "value": 256
}
}, - "discount": {
- "currency": "str",
- "value": 256
}, - "items": [
- {
- "external_id": 45,
- "name": "demo order item",
- "price": {
- "currency": "str",
- "value": 256
}, - "quantity": {
- "unit": "pcs",
- "value": 5
},
}
], - "number": "23546",
- "payments": [
- {
- "amount": {
- "currency": "str",
- "value": 256
}, - "name": "paid",
- "status": {
- "name": "demo-payment-status",
- "payed": true
}
}
], - "status": {
- "code": "approval",
- "name": "approval"
},
}, - "product": {
- "id": 56,
- "article": "324-DFT-495",
- "cost": {
- "currency": "str",
- "value": 256
}, - "name": "demo product",
- "unit": "string",
}, - "scope": "public",
- "status": "seen",
- "time": "2022-05-30T22:28:55Z",
- "transport_attachments": {
}, - "type": "text"
}Removes a reaction from a message
Request for delete reaction
required | object Message identifier |
| channel required | integer <int64> Sending channel identifier |
| reaction | string Removable reaction |
{- "channel": 88,
- "message": {
- "id": 45,
- "external_id": "rm2884"
}, - "reaction": "string"
}{ }Adds one of the channel's allowed reactions to a message
Request for add reaction
required | object Message identifier |
| channel required | integer <int64> Sending channel identifier |
| reaction required | string Removable reaction |
{- "channel": 88,
- "message": {
- "id": 45,
- "external_id": "rm2884"
}, - "reaction": "string"
}{ }