Skip to content
Get started
Esc
List contacts

Contacts

GET /v1/contacts

The customers you have dealt with, newest first: those who wrote, were written to or gave consent, on the connected channels with a live key and on the simulator with a test key. With phone, only the contact with that number, to find their id and whether you may write to them. A page has up to limit contacts, and while has_more is true, the next page comes with the last contact's id in after.

Query parameters

phone string
Only the contact with this number, in E.164, with or without the +. The list then has one contact or none.
limit integer
How many items a page has, from 1 to 100, 20 by default.
after string
The id of the last contact on the page before, for the next page.

Errors

CodeHTTPWhat it means
invalid_request422The request is not filled in correctly.
invalid_phone422Give the number in international format, for example +77011234567.

Any request can also get the codes on Errors, such as unauthenticated and rate_limited.

Code language
// npm install @airboxhq/api
// AIRBOX_API_KEY=YOUR_API_KEY node list_contacts.mjs
import { Airbox } from "@airboxhq/api";

const client = new Airbox(process.env.AIRBOX_API_KEY);

const { data, error } = await client.contacts.list({
  phone: "+77011234567",
});

if (error) {
  throw new Error(`${error.code}: ${error.message} (${error.requestId})`);
}

console.log(data);
Response 200
{
    "data": [
        {
            "id": "0199c5e2-1f0a-7a42-8d1e-5b7c9a2e4f10",
            "name": "Asel",
            "phone": "+77011234567",
            "instagram_id": null,
            "channel": "whatsapp",
            "free_text_until": "2026-10-10T09:28:00+00:00",
            "consent": true,
            "opted_out": false,
            "last_message_at": "2026-10-09T09:30:00+00:00",
            "created_at": "2026-09-14T11:05:00+00:00"
        }
    ],
    "has_more": false
}