Get contacts for a chatbot

GET/v1/chatbots/{chatbotId}/contacts

List the contacts of a chatbot with the legacy v1 API, one page at a time, optionally filtered by email address.

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

Returns the contacts of a chatbot. Call it to export contacts to another system, or to look up a person by email address.

Request

GET /v1/chatbots/{chatbotId}/contacts

Path parameters:

Name Type Required Description
chatbotId string Yes The ID of the chatbot, starting with agt_.

Query parameters:

Name Type Required Description
page integer No Page number, starting at 1. Defaults to 1.
size integer No Number of contacts per page. Defaults to 20.
email string No Return only the contact with this exact email address.

To read every contact, request pages until data comes back empty or you have collected total contacts. Contacts are created with Create contacts for a chatbot or uploaded as a CSV file, see Uploading contacts.

The email filter is an exact match. It returns at most one contact, so it works as a lookup when you only know the address.

Example request

curl "https://api.askocto.co/v1/chatbots/agt_8f3k2m/contacts?page=1&size=20" \
  -H "Authorization: Bearer $OCTO_API_KEY"
const url = new URL("https://api.askocto.co/v1/chatbots/agt_8f3k2m/contacts")
url.searchParams.set("page", "1")
url.searchParams.set("size", "20")

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

const { data, total } = await response.json()
console.log(`${data.length} of ${total} contacts`)

Example response

A successful call returns 200 OK.

{
  "data": [
    {
      "id": "con_4d7h2q",
      "chatbotId": "agt_8f3k2m",
      "name": "Maya Jensen",
      "email": "maya@example.com",
      "phone": "+15555550123",
      "attributes": { "plan": "pro" },
      "createdAt": "2026-03-14T09:30:00Z",
      "updatedAt": "2026-03-20T14:05:00Z"
    },
    {
      "id": "con_9s1m6t",
      "chatbotId": "agt_8f3k2m",
      "name": "Tom Okafor",
      "email": "tom@example.com",
      "phone": null,
      "attributes": { "plan": "free" },
      "createdAt": "2026-03-15T16:42:00Z",
      "updatedAt": "2026-03-15T16:42:00Z"
    }
  ],
  "page": 1,
  "size": 20,
  "total": 2
}

Response fields

Name Type Description
data array The contacts on this page. Each has the fields described in Get a specific contact.
page integer The page you asked for.
size integer The page size in use.
total integer How many contacts match your filters.

Errors

Status Code When
400 invalid_request page or size is not a positive integer.
401 unauthorized The API key is missing, malformed or revoked.
404 not_found No chatbot with this ID exists in your workspace.
429 rate_limited Too many requests. Wait for the number of seconds in the Retry-After header.

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