A contact is a collection that groups together underlying connected channel recipient identities. It's tied to a specific project and is therefore considered public to all apps sharing the same project. Most contact creation and maintenance is handled by the Conversation API's automatic contact management processes. However, you can also use API calls to manually manage your contacts.
A contact has the following configurable properties:
Field | Description |
---|---|
Channel identities | List of channel identities specifying how the contact is identified on underlying channels |
Channel priority | Specifies the channel priority order used when sending messages to this contact. This can be overridden by message specific channel priority order. |
Display name | Optional display name used in chat windows and other UIs |
Optional Email of the contact | |
External id | Optional identifier of the contact in external systems |
Metadata | Optional metadata associated with the contact. |
List all contacts in the project.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
A successful response.
Malformed request
Incorrect credentials
Correct credentials but you don't have access to the requested resource
Correct credentials but you don't have access to the requested resource
Something went wrong on our end, try again with exponential back-off
{- "contacts": [
- {
- "channel_identities": [
- {
- "app_id": "string",
- "channel": "WHATSAPP",
- "identity": "string"
}
], - "channel_priority": [
- "WHATSAPP"
], - "display_name": "string",
- "email": "string",
- "external_id": "string",
- "id": "{CONTACT_ID}",
- "language": "string",
- "metadata": "string"
}
], - "next_page_token": "string"
}
Most Conversation API contacts are created automatically when a message is sent to a new recipient. You can also create a new contact manually using this API call.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
The contact to create.
A successful response.
Array of objects (Channel Identity) List of channel identities. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel_priority | Array of strings (Channel Identifier) List of channels defining the channel priority. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
display_name | string The display name. A default 'Unknown' will be assigned if left empty. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
string Email of the contact. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
external_id | string Contact identifier in an external system. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string The ID of the contact. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
language | string (ContactLanguage)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | string Metadata associated with the contact. Up to 1024 characters long. |
Malformed request
Incorrect credentials
Correct credentials but you don't have access to the requested resource
Correct credentials but you don't have access to the requested resource
Something went wrong on our end, try again with exponential back-off
{- "channel_identities": [
- {
- "channel": "WHATSAPP",
- "identity": "{{WHATSAPP_PHONE_NUMBER}}"
}
], - "language": "EN_US",
- "display_name": "New Contact",
- "email": "new.contact@email.com"
}
{- "channel_identities": [
- {
- "app_id": "string",
- "channel": "WHATSAPP",
- "identity": "string"
}
], - "channel_priority": [
- "WHATSAPP"
], - "display_name": "string",
- "email": "string",
- "external_id": "string",
- "id": "{CONTACT_ID}",
- "language": "string",
- "metadata": "string"
}
Returns a specific contact as specified by the contact ID.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
contact_id required | string The unique ID of the contact. |
A successful response.
Array of objects (Channel Identity) List of channel identities. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel_priority | Array of strings (Channel Identifier) List of channels defining the channel priority. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
display_name | string The display name. A default 'Unknown' will be assigned if left empty. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
string Email of the contact. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
external_id | string Contact identifier in an external system. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string The ID of the contact. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
language | string (ContactLanguage)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | string Metadata associated with the contact. Up to 1024 characters long. |
Malformed request
Incorrect credentials
Correct credentials but you don't have access to the requested resource
Correct credentials but you don't have access to the requested resource
Something went wrong on our end, try again with exponential back-off
{- "channel_identities": [
- {
- "app_id": "string",
- "channel": "WHATSAPP",
- "identity": "string"
}
], - "channel_priority": [
- "WHATSAPP"
], - "display_name": "string",
- "email": "string",
- "external_id": "string",
- "id": "{CONTACT_ID}",
- "language": "string",
- "metadata": "string"
}
Delete a contact as specified by the contact ID.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
contact_id required | string The unique ID of the contact. |
A successful response.
Malformed request
Incorrect credentials
Correct credentials but you don't have access to the requested resource
Correct credentials but you don't have access to the requested resource
Something went wrong on our end, try again with exponential back-off
null
Updates a contact as specified by the contact ID.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
contact_id required | string The unique ID of the contact. |
The updated contact.
Array of objects (Channel Identity) List of channel identities. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel_priority | Array of strings (Channel Identifier) List of channels defining the channel priority. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
display_name | string The display name. A default 'Unknown' will be assigned if left empty. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
string Email of the contact. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
external_id | string Contact identifier in an external system. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string The ID of the contact. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
language | string (ContactLanguage)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | string Metadata associated with the contact. Up to 1024 characters long. |
A successful response.
Array of objects (Channel Identity) List of channel identities. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel_priority | Array of strings (Channel Identifier) List of channels defining the channel priority. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
display_name | string The display name. A default 'Unknown' will be assigned if left empty. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
string Email of the contact. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
external_id | string Contact identifier in an external system. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string The ID of the contact. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
language | string (ContactLanguage)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | string Metadata associated with the contact. Up to 1024 characters long. |
Malformed request
Incorrect credentials
Correct credentials but you don't have access to the requested resource
Correct credentials but you don't have access to the requested resource
Something went wrong on our end, try again with exponential back-off
{ }
{- "channel_identities": [
- {
- "app_id": "string",
- "channel": "WHATSAPP",
- "identity": "string"
}
], - "channel_priority": [
- "WHATSAPP"
], - "display_name": "string",
- "email": "string",
- "external_id": "string",
- "id": "{CONTACT_ID}",
- "language": "string",
- "metadata": "string"
}
The remaining contact will contain all conversations that the removed contact did. If both contacts had conversations within the same App, messages from the removed contact will be merged into corresponding active conversations in the destination contact. Channel identities will be moved from the source contact to the destination contact only for channels that weren't present there before. Moved channel identities will be placed at the bottom of the channel priority list. Optional fields from the source contact will be copied only if corresponding fields in the destination contact are empty The contact being removed cannot be referenced after this call.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
destination_id required | string The unique ID of the contact that should be kept when merging two contacts. |
The contact to be removed.
A successful response.
Array of objects (Channel Identity) List of channel identities. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel_priority | Array of strings (Channel Identifier) List of channels defining the channel priority. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
display_name | string The display name. A default 'Unknown' will be assigned if left empty. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
string Email of the contact. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
external_id | string Contact identifier in an external system. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string The ID of the contact. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
language | string (ContactLanguage)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | string Metadata associated with the contact. Up to 1024 characters long. |
Malformed request
Incorrect credentials
Correct credentials but you don't have access to the requested resource
Correct credentials but you don't have access to the requested resource
Something went wrong on our end, try again with exponential back-off
{- "source_id": "string"
}
{- "channel_identities": [
- {
- "app_id": "string",
- "channel": "WHATSAPP",
- "identity": "string"
}
], - "channel_priority": [
- "WHATSAPP"
], - "display_name": "string",
- "email": "string",
- "external_id": "string",
- "id": "{CONTACT_ID}",
- "language": "string",
- "metadata": "string"
}
Get user profile from a specific channel.
Supported only on MESSENGER
, INSTAGRAM
, VIBER
and LINE
channels.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
app_id required | string The ID of the app. |
required | contact_id (object) or identified_by (object) The recipient to check profile information. Requires either |
channel required | string (GetChannelProfileConversationChannel) The channel. Must be one of the supported channels for this operation. |
Malformed request
Incorrect credentials
Correct credentials but you don't have access to the requested resource
Correct credentials but you don't have access to the requested resource
Something went wrong on our end, try again with exponential back-off
{- "app_id": "{APP_ID}",
- "recipient": {
- "contact_id": "{CONTACT_ID}"
}, - "channel": "MESSENGER"
}
{- "profile_name": "John Doe"
}