Skip to content

Conversation API - Batch API | Sinch (0.0.1)

Perform batch operations on select Conversation API resources.

Download OpenAPI description
Overview
support at sinch

support@sinch.com

License

MIT

Languages
Servers
The {region} variable must be set to either us or eu

https://{region}.conversationbatch.api.sinch.com/

Messages

Send a message to one or many recipients. This API supports the same channels as Conversation API.

Operations

Contacts

Create or delete contacts in batches.

Operations

Consents

Manage Conversation API consents in batches.

Operations

Request

Insert consent records for multiple identifications in a single request. If the request fails, none or only some of the records may be inserted. Retry the batch later to try again.

Security
BearerAuth
Path
project_idstringrequired

The unique ID of the project. You can find this on the Sinch Dashboard.

Bodyapplication/jsonrequired
app_idstringrequired

The ID of the Conversation API app under which the consent records are to be stored.

consent_recordsArray of objectsrequired

A list of consent records to create. Each record must include an identification field, which uniquely identifies the subject (e.g., phone number or contact ID), and a consent_type.

consent_records[].​identificationstringrequired

Unique identifier for the subject of the consent (e.g., phone number, contact ID).

consent_records[].​consent_typestring

The type of consent being inserted.

Enum"OPT_OUT_ALL""OPT_OUT_NOTIFICATION""OPT_OUT_MARKETING"
curl -i -X POST \
  'https://us.conversationbatch.api.sinch.com/v1/projects/{project_id}/consents' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "app_id": "{{APP_ID}}",
    "consent_records": [
      {
        "identification": "{{PHONE_NUMBER_1}}",
        "consent_type": "OPT_OUT_ALL"
      },
      {
        "identification": "{{PHONE_NUMBER_2}}",
        "consent_type": "OPT_OUT_MARKETING"
      },
      {
        "identification": "{{PHONE_NUMBER_3}}",
        "consent_type": "OPT_OUT_NOTIFICATION"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
batch_idstring

The unique ID for the batch of consent records created.

Response
application/json
{ "batch_id": "string" }