Skip to main content
GET/api/public/conversations/

Get all conversations

You can return a list of your conversations. As an option, you can set status parameter to the request URL to narrow the results (status equals to true). This will show only open conversations.

Results are paginated: follow next to get the next page (see Response pagination).

Request URL would look like this:

https://<your_app_subdomain>.user.com/api/public/conversations/?status=true

Request​

curl -X GET "https://<your_app_subdomain>.user.com/api/public/conversations/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"

Response examples​

{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 21,
"assigned_to": ,4 fields
"active": false,
"agent": ,2 fields
"messages": 5
},
{
"id": 20,
"assigned_to": ,4 fields
"active": false,
"agent": ,2 fields
"messages": 5
}
]
}

Response fields​

Fields returned in the 200 OK response body.

countinteger
Number of results across all pages. It can lag behind recent changes; see Response pagination.
nextstring (URL)nullable
URL of the next page of results. null on the last page.
previousstring (URL)nullable
URL of the previous page of results. null on the first page.
resultsarray of objects
Results on this page.
results[].idinteger
A unique identifier for the conversation which is given by User automatically.
results[].assigned_toobject
The contact the conversation is with.
results[].assigned_to.idinteger
ID of the contact.
results[].assigned_to.keystring
The contact's user_key: a 12-character identifier assigned by User.
results[].assigned_to.namestring
The contact's name.
results[].assigned_to.emailstringnullable
The contact's email address, or null if they have none.
results[].activeboolean
Whether the conversation is open. false once it is closed.
results[].agentobjectnullable
The agent group the conversation is assigned to, or null.
results[].agent.idinteger
ID of the agent group.
results[].agent.namestring
Name of the agent group.
results[].messagesinteger
Number of messages in the conversation.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.