Skip to main content
GET/api/public/users/:user_id/conversations/

Get user conversations

You can return a list of all conversations with a specific user.

Attributes

Optional unless marked required

user_idstringrequired
A unique identifier for the user which is given by User automatically.

Request​

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

Response examples​

{
"count": 1,
"next": "https://example.com",
"previous": "https://example.com",
"results": [
{
"id": 1,
"assigned_to": {
"id": 1,
"key": "g7lvoickax9e",
"name": "Jane Agent",
"email": "agent@example.com"
},
"active": true,
"agent": {
"id": 1,
"name": "Jane Agent"
},
"messages": 1
}
]
}

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[].agentobject
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.