К содержанию
Esc
Статус сообщения

Messages

Статус сообщения

GET /v1/messages/{id}

Сообщение организации по id: его статус, а если оно не ушло, код причины.

Returns the message object.

Path parameters

id string required
The message's id, from the response to the send or from a webhook event.

Errors

CodeHTTPWhat it means
not_found404Ничего не найдено. Ключ видит только сообщения своей организации и своего режима, боевого или тестового.

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

Язык кода
// npm install @airboxhq/api
// AIRBOX_API_KEY=YOUR_API_KEY node get_message.mjs
import { Airbox } from "@airboxhq/api";

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

const { data, error } = await client.messages.get("0199c5e2-7b3a-7c51-9f0e-3a1d2b4c5e6f");

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

console.log(data);
Response 200
{
    "id": "0199c5e2-7b3a-7c51-9f0e-3a1d2b4c5e6f",
    "to": "+77011234567",
    "contact_id": "0199c5e2-1f0a-7a42-8d1e-5b7c9a2e4f10",
    "channel": "whatsapp",
    "type": "text",
    "text": {
        "body": "Здравствуйте! Ваш заказ №1042 готов, забрать его можно сегодня до 20:00."
    },
    "status": "delivered",
    "error": null,
    "sent_by": "api",
    "created_at": "2026-10-09T09:30:00+00:00",
    "sent_at": "2026-10-09T09:30:00+00:00",
    "delivered_at": "2026-10-09T09:30:02+00:00",
    "read_at": null
}