Skip to content

List Contacts

Request

List all contacts in the project. Note that, if a WhatsApp contact is returned, the display_name field of that contact may be populated with the WhatsApp display name (if the name is already stored on the server and the display_name field has not been overwritten by the user).

Security
Basic or oAuth2
Path
project_idstringrequired

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

Query
page_sizeinteger, (int32)

Optional. The maximum number of contacts to fetch. The default is 10 and the maximum is 20.

page_tokenstring

Optional. Next page token previously returned if any.

external_idstring

Optional. Contact identifier in an external system. If used, channel and identity query parameters can't be used.

channelstring(Channel Identifier)

Optional. Specifies a channel, and must be set to one of the enum values. If set, the identity parameter must be set and external_id can't be used. Used in conjunction with identity to uniquely identify the specified channel identity.

Enum ValueDescription
SMS

The SMS channel.

RCS

The RCS channel.

WHATSAPP

The WhatsApp channel.

MMS

The MMS channel.

KAKAOTALK

The KakaoTalk channel.

KAKAOTALKCHAT

The KakaoTalk chat channel (used primarily in ConsultationTalk).

VIBERBM

The Viber Business Messages channel.

LINE

The LINE channel.

INSTAGRAM

The Instagram channel.

MESSENGER

The Facebook Messenger channel.

WECHAT

The WeChat channel.

TELEGRAM

The Telegram channel.

APPLEBC

The Apple Messages for Business channel.

Example:channel=WHATSAPP
identitystring

Optional. If set, the channel parameter must be set and external_id can't be used. Used in conjunction with channel to uniquely identify the specified channel identity. This will differ from channel to channel. For example, a phone number for SMS, WhatsApp, and Viber Business.

curl -i -X GET \
  -u '<username>:<password>' \
  'https://us.conversation.api.sinch.com/v1/projects/{project_id}/contacts?page_size=0&page_token=string&external_id=string&channel=WHATSAPP&identity=string'

Responses

A successful response.

Bodyapplication/json
contactsArray of objects(Contact)

List of contacts belonging to the specified project.

next_page_tokenstring

Token that should be included in the next list contacts request to fetch the next page.

Response
{ "contacts": [ { … } ], "next_page_token": "string" }