This operation lists all conversations that are associated with an app and/or a contact.
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
{- "conversations": [
- {
- "active": true,
- "active_channel": "WHATSAPP",
- "app_id": "string",
- "contact_id": "string",
- "id": "string",
- "last_received": "2019-08-24T14:15:22Z",
- "metadata": "string",
- "metadata_json": { }
}
], - "next_page_token": "string",
- "total_size": 0
}
Creates a new empty conversation. It is generally not needed to create a conversation explicitly since sending or receiving a message automatically creates a new conversation if it does not already exist between the given app and contact. Creating empty conversation is useful if the metadata of the conversation should be populated when the first message in the conversation is a contact message or the first message in the conversation comes out-of-band and needs to be injected with InjectMessage endpoint.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
The conversation to create. ID will be generated for the conversation and any ID in the given conversation will be ignored.
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
{- "active": true,
- "active_channel": "WHATSAPP",
- "app_id": "{APP_ID}",
- "contact_id": "{CONTACT_ID}",
- "id": "string",
- "metadata": "string",
- "metadata_json": { }
}
{- "active": true,
- "active_channel": "WHATSAPP",
- "app_id": "string",
- "contact_id": "string",
- "id": "string",
- "last_received": "2019-08-24T14:15:22Z",
- "metadata": "string",
- "metadata_json": { }
}
Retrieves a conversation by id. A conversation has two participating entities, an app and a contact.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
conversation_id required | string The unique ID of the conversation. This is generated by the system. |
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
{- "active": true,
- "active_channel": "WHATSAPP",
- "app_id": "string",
- "contact_id": "string",
- "id": "string",
- "last_received": "2019-08-24T14:15:22Z",
- "metadata": "string",
- "metadata_json": { }
}
Deletes a conversation together with all the messages sent as part of the conversation.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
conversation_id required | string The unique ID of the conversation. This is generated by the system. |
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
This operation updates a conversation which can, for instance, be used to update the metadata associated with a conversation.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
conversation_id required | string The unique ID of the conversation. This is generated by the system. |
The updated conversation.
active | boolean Flag for whether this conversation is active. |
active_channel | string (ConversationChannel) The identifier of the channel you want to include. Must be one of the enum values. |
app_id | string The ID of the participating app. |
contact_id | string The ID of the participating contact. |
id | string The ID of the conversation. |
metadata | string Arbitrary data set by the Conversation API clients. Up to 1024 characters long. |
metadata_json | object Arbitrary data set by the Conversation API clients and/or provided in the |
A successful response.
active | boolean Flag for whether this conversation is active. |
active_channel | string (ConversationChannel) The identifier of the channel you want to include. Must be one of the enum values. |
app_id | string The ID of the participating app. |
contact_id | string The ID of the participating contact. |
id | string The ID of the conversation. |
last_received | string <date-time> The timestamp of the latest message in the conversation. The timestamp will be Thursday January 01, 1970 00:00:00 UTC if the conversation contains no messages. |
metadata | string Arbitrary data set by the Conversation API clients. Up to 1024 characters long. |
metadata_json | object Arbitrary data set by the Conversation API clients and/or provided in the |
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
{- "metadata": "string"
}
{- "active": true,
- "active_channel": "WHATSAPP",
- "app_id": "string",
- "contact_id": "string",
- "id": "string",
- "last_received": "2019-08-24T14:15:22Z",
- "metadata": "string",
- "metadata_json": { }
}
This operation stops the referenced conversation, if the conversation is still active. A new conversation will be created if a new message is exchanged between the app or contact that was part of the stopped conversation.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
conversation_id required | string The unique ID of the conversation. This is generated by the system. |
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
This operation injects a conversation message in to a specific conversation.
project_id required | string The unique ID of the project. You can find this on the Sinch Dashboard. |
message.conversation_id required | string Required. The ID of the conversation. |
Message to be injected.
accept_time | string <date-time> The processed time of the message in UTC timezone. Must be less than current_time and greater than (current_time - 30 days) |
object (AppMessage) Message originating from an app | |
object (ChannelIdentity) A unique identity of message recipient on a particular channel. For example, the channel identity on SMS, WHATSAPP or VIBERBM is a MSISDN phone number. | |
contact_id | string The ID of the contact registered in the conversation provided. |
object (ContactMessage) Message originating from a contact | |
direction | string (ConversationDirection) Enum: "UNDEFINED_DIRECTION" "TO_APP" "TO_CONTACT" |
metadata | string Optional. Metadata associated with the contact. Up to 1024 characters long. |
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