Perform batch operations on select Conversation API resources.
Conversation API - Batch API | Sinch (0.0.1)
https://{region}.conversationbatch.api.sinch.com/
Messages
Send a message to one or many recipients. This API supports the same channels as Conversation API.
The unique ID of the project. You can find this on the Sinch Dashboard.
List of contacts to be created in Conversation API.
List of channel identities. Array must contain at least one item.
Required if using a channel that uses app-scoped channel identities. Currently, FB Messenger, Instagram, LINE, and WeChat use app-scoped channel identities, which means contacts will have different channel identities on different Conversation API apps. These can be thought of as virtual identities that are app-specific and, therefore, the app_id must be included in the API call.
The identifier of the channel you want to include. Must be one of the enum values.
Enum Value | Description |
---|---|
The WhatsApp channel. | |
RCS | The RCS channel. |
SMS | The SMS channel. |
MESSENGER | The Facebook Messenger channel. |
VIBERBM | The Viber Business Messages channel. |
MMS | The MMS channel. |
The Instagram channel. | |
TELEGRAM | The Telegram channel. |
KAKAOTALK | The KakaoTalk channel. |
KAKAOTALKCHAT | The KakaoTalk chat channel (used primarily in ConsultationTalk). |
List of channels defining the channel priority. The channel at the top of the list is tried first.
Items Enum Value | Description |
---|---|
The WhatsApp channel. | |
RCS | The RCS channel. |
SMS | The SMS channel. |
MESSENGER | The Facebook Messenger channel. |
VIBERBM | The Viber Business Messages channel. |
MMS | The MMS channel. |
The Instagram channel. | |
TELEGRAM | The Telegram channel. |
KAKAOTALK | The KakaoTalk channel. |
KAKAOTALKCHAT | The KakaoTalk chat channel (used primarily in ConsultationTalk). |
Enum Value | Description |
---|---|
AF | Afrikaans |
SQ | Albanian |
AR | Arabic |
AZ | Azerbaijani |
BN | Bengali |
BG | Bulgarian |
CA | Catalan |
ZH | Chinese |
ZH_CN | Chinese (CHN) |
ZH_HK | Chinese (HKG) |
- The {region} variable must be set to either us or eu
https://us.conversationbatch.api.sinch.com/v1/projects/{project_id}/contacts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://us.conversationbatch.api.sinch.com/v1/projects/{project_id}/contacts' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"contacts": [
{
"channel_identities": [
{
"channel": "WHATSAPP",
"identity": "{{PHONE_NUMBER_1}}"
}
],
"language": "EN_US"
},
{
"channel_identities": [
{
"channel": "RCS",
"identity": "{{PHONE_NUMBER_2}}"
}
],
"language": "EN_US"
},
{
"channel_identities": [
{
"channel": "RCS",
"identity": "{{PHONE_NUMBER_3}}"
}
],
"language": "EN_US"
}
]
}'
The unique ID of the project. You can find this on the Sinch Dashboard.
- The {region} variable must be set to either us or eu
https://us.conversationbatch.api.sinch.com/v1/projects/{project_id}/contacts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://us.conversationbatch.api.sinch.com/v1/projects/{project_id}/contacts' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"contact_ids": [
"{{CONTACT_1}}",
"{{CONTACT_2}}",
"{{CONTACT_3}}",
"{{CONTACT_4}}",
"{{CONTACT_5}}"
]
}'