Conversations
The Conversations resource allows you to retrieve user conversations. The following actions can be performed on this resource:
- Retrieve All Conversations
- Retrieve a Specific Conversation
Retrieve All Conversations
Retrieves all conversations on your account. If you want to retrieve the messages from a conversation, use the conversationSid and fetch the single conversation. The default number of conversations is 20.
You can include additional parameters in the request as described in the Query Parameters section. For instance, the request below will return conversations with a status of "archived".
Available query parameters:
- limit: 20 (default)
- offset: 0 (default)
- status: ‘archived’ (default = '')
- recentTimestamp: ‘desc’ | ‘asc’ (default = ‘desc’)
Example Response:
Retrieve a Single Conversation
Retrieves a single conversation with the conversation ID equal to {id}. Also fetches the 10 (default) most recent messages in the conversation.
You can add a query to change the limit of the number of messages to retrieve by appending
?limit=10 to the request. Max limit of 100.
Example Response: