Contacts

The Batch API Contacts endpoint allows you to create or delete batches of up to 1000 contacts.

You can use the Conversation API Contact documentation as additional reference material.

Create contacts Beta

Creates a batch of up to 1000 contacts as specified by the list of contacts.

The contacts are created asynchronously. A CONTACT_CREATE event will be generated for every successfully created contact.

SecurityBearerAuth
Request
path Parameters
project_id
required
string

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

Request Body schema: application/json
required
required
Array of objects (Contact creation request) [ 1 .. 1000 ] items

List of contacts to be created in Conversation API.

Array ([ 1 .. 1000 ] items)
required
Array of objects (Channel Identity)

List of channel identities. Array must contain at least one item.

language
required
string (ContactLanguage)
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)

ZH_TW

Chinese (TAI)

HR

Croatian

CS

Czech

DA

Danish

NL

Dutch

EN

English

EN_GB

English (UK)

EN_US

English (US)

ET

Estonian

FIL

Filipino

FI

Finnish

FR

French

DE

German

EL

Greek

GU

Gujarati

HA

Hausa

HE

Hebrew

HI

Hindi

HU

Hungarian

ID

Indonesian

GA

Irish

IT

Italian

JA

Japanese

KN

Kannada

KK

Kazakh

KO

Korean

LO

Lao

LV

Latvian

LT

Lithuanian

MK

Macedonian

MS

Malay

ML

Malayalam

MR

Marathi

NB

Norwegian

FA

Persian

PL

Polish

PT

Portuguese

PT_BR

Portuguese (BR)

PT_PT

Portuguese (PT)

PA

Punjabi

RO

Romanian

RU

Russian

SR

Serbian

SK

Slovak

SL

Slovenian

ES

Spanish

ES_AR

Spanish (ARG)

ES_ES

Spanish (SPA)

ES_MX

Spanish (MEX)

SW

Swahili

SV

Swedish

TA

Tamil

TE

Telugu

TH

Thai

TR

Turkish

UK

Ukrainian

UR

Urdu

UZ

Uzbek

VI

Vietnamese

ZU

Zulu

channel_priority
Array of strings (Channel Identifier)

List of channels defining the channel priority. The channel at the top of the list is tried first.

Items Enum: "WHATSAPP" "RCS" "SMS" "MESSENGER" "VIBER" "VIBERBM" "MMS" "INSTAGRAM" "TELEGRAM" "KAKAOTALK" "KAKAOTALKCHAT" "LINE" "WECHAT" "APPLEBC"
display_name
string

The display name. A default 'Unknown' will be assigned if left empty.

email
string

Email of the contact.

external_id
string

Contact identifier in an external system.

metadata
string

Metadata associated with the contact. Up to 1024 characters long.

Responses
200

OK

401

Invalid credentials

403

Permission denied. The specified project may not be allowed to use the batch endpoint.

500

Internal error

post/v1beta/projects/{project_id}/contacts
Request samples
application/json
{
  • "contacts": [
    • {
      • "channel_identities": [
        • {
          }
        ],
      • "language": "EN_US"
      },
    • {
      • "channel_identities": [
        • {
          }
        ],
      • "language": "EN_US"
      },
    • {
      • "channel_identities": [
        • {
          }
        ],
      • "language": "EN_US"
      }
    ]
}
Response samples
application/json
{
  • "error": {
    • "code": 403,
    • "message": "",
    • "status": "PERMISSION_DENIED",
    • "details": [ ]
    }
}

Delete contacts Beta

Deletes a batch of up to 1000 contacts as specified by the list of contact IDs.

The contacts are deleted asynchronously. A CONTACT_DELETE event will be generated for every successfully deleted contact.

SecurityBearerAuth
Request
path Parameters
project_id
required
string

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

Request Body schema: application/json
required
contact_ids
required
Array of strings [ 1 .. 1000 ] items

List of IDs for contacts to be deleted in Conversation API.

Responses
200

OK

401

Invalid credentials

403

Permission denied. The specified project may not be allowed to use the batch endpoint.

500

Internal error

delete/v1beta/projects/{project_id}/contacts
Request samples
application/json
{
  • "contact_ids": [
    • "{{CONTACT_1}}",
    • "{{CONTACT_2}}",
    • "{{CONTACT_3}}",
    • "{{CONTACT_4}}",
    • "{{CONTACT_5}}"
    ]
}
Response samples
application/json
{
  • "error": {
    • "code": 403,
    • "message": "",
    • "status": "PERMISSION_DENIED",
    • "details": [ ]
    }
}