List conversations

GET/v2/agents/{agentId}/conversations

Return the conversations of an agent, newest first, filtered by status, channel, user or date range, one cursor page at a time.

Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.

Returns the conversations of an agent, newest first. Call it to feed a report, sync conversations to your own storage, or find the conversations that were handed to your team.

Request

GET /v2/agents/{agentId}/conversations

Path parameters:

Name Type Required Description
agentId string Yes The ID of the agent, starting with agt_.

Query parameters:

Name Type Required Description
limit integer No Items per page, from 1 to 100. Defaults to 20.
cursor string No The nextCursor value from the previous page.
status string No open, resolved or handoff.
channel string No One channel, for example widget, email, voice or whatsapp.
userId string No Only conversations of this user, starting with usr_.
from string No Only conversations created at or after this ISO 8601 UTC time.
to string No Only conversations created before this ISO 8601 UTC time.

Combine filters to narrow the list, for example status=handoff with a from date to see what your team had to pick up this week. The messages of a conversation are not part of the list. To find conversations by what was said, use Search conversations.

Example request

curl "https://api.askocto.co/v2/agents/agt_8f3k2m/conversations?status=handoff&limit=20" \
  -H "Authorization: Bearer $OCTO_API_KEY"
const url = new URL("https://api.askocto.co/v2/agents/agt_8f3k2m/conversations")
url.searchParams.set("status", "handoff")
url.searchParams.set("limit", "20")

const response = await fetch(url, {
  headers: { Authorization: `Bearer ${process.env.OCTO_API_KEY}` },
})

const { data, nextCursor } = await response.json()
console.log(`${data.length} conversations`, nextCursor)

Example response

A successful call returns 200 OK.

{
  "data": [
    {
      "id": "conv_5n2p8w",
      "agentId": "agt_8f3k2m",
      "userId": "usr_3b6t0z",
      "channel": "widget",
      "status": "handoff",
      "messageCount": 6,
      "createdAt": "2026-03-20T13:58:00Z",
      "updatedAt": "2026-03-20T14:05:00Z"
    },
    {
      "id": "conv_8h4v1y",
      "agentId": "agt_8f3k2m",
      "userId": "usr_6k9d2r",
      "channel": "whatsapp",
      "status": "handoff",
      "messageCount": 9,
      "createdAt": "2026-03-19T09:12:00Z",
      "updatedAt": "2026-03-19T09:31:00Z"
    }
  ],
  "nextCursor": "cur_a81f3c92"
}

Response fields

Name Type Description
data[].id string The conversation ID, starting with conv_.
data[].agentId string The agent that handled it.
data[].userId string or null Your ID for the person, if you sent one.
data[].channel string Where the conversation took place, such as widget, email, voice or whatsapp.
data[].status string open, resolved or handoff.
data[].messageCount integer The number of messages in the conversation.
data[].createdAt, data[].updatedAt string ISO 8601 UTC times.
nextCursor string or null Pass it as cursor for the next page. null on the last page.

Errors

Status Code When
400 invalid_request A filter has an unknown value, or from or to is not an ISO 8601 time.
401 unauthorized The API key is missing, malformed or deleted.
404 not_found No agent has this ID in your workspace.
429 rate_limited Too many requests. Wait for the number of seconds in the Retry-After header.

Read more about cursors in Pagination.

Something unclear or missing? Tell us and we will fix the page.