List Conversations

This is the documentation for fetching the list of conversations.

Required Resources

To use this service, you'll need:

  1. Authentication: You'll need a Bearer authentication token.

Endpoint

Get Conversations List

To get the list of conversations, you can use the following endpoint.

Query ParamTypeDescription
limit (optional)intMax number of conversations to retrieve (max 100, default 25).
statusId (optional, repeatable)intReturn only conversations that match the provided status code. Uses the following values:

1: OPEN
2: CLOSED
3: PENDING
page_token (optional)stringAllows you to move to the next page

Request

curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://api.drift.com/conversations/list?limit=50'
import requests

url = "https://api.drift.com/conversations/list?limit=50"

headers = {
    "Authorization": "Bearer <auth_token>"
}

response = requests.get(url, headers=headers)

print(response.json())

Replace <auth_token> with your authentication token.

Response

{
    "data": [
        {
            "status": "open",
            "contactId": 17035536800,
            "createdAt": 1686303243241,
            "id": 3782727146,
            "inboxId": 62491,
            "updatedAt": 1686303381300
        },
        ...
    ],
    "links": {
        "self": "https://api.drift.com/conversations/list?page_token=<self_page_token>",
        "next": "https://api.drift.com/conversations/list?page_token=<next_page_token>"
    }
}

In the response, each item in the data array represents a conversation. Each conversation includes fields such as status, contactId, createdAt, id, inboxId, and updatedAt.

The links object contains links to the current ("self") and next pages of data.

So in this case if you want to move to the next page you will need to use next url, it will keep your page size.

Example next request

curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://api.drift.com/conversations/list?page_token=<next_page_token>'
import requests

url = "https://api.drift.com/conversations/list?page_token=<next_page_token>"

headers = {
    "Authorization": "Bearer <auth_token>"
}

response = requests.get(url, headers=headers)

print(response.json())