---
title: "Get a message"
method: GET
path: "/messages/{message_id}"
tags: ["Messages"]
---

# Get a message

`GET /messages/{message_id}`

## Request

- Base URL: `https://api.axilio.ai/api/v1`
- URL: `https://api.axilio.ai/api/v1/messages/{message_id}`
- Auth: API key in header `X-Axilio-Api-Key`
- TypeScript: <https://skmtc.dev/axilioai/apis/axilio-api-2/docs/messages/:message_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns one text message a dedicated phone received or sent, with its full body. A sent message carries its delivery status.

## Path parameters

- `message_id` string, uuid, required: message identifier

## Response `200`

OK

- PhoneMessage: A text message on one of the organization's dedicated phones.
  - `accepted_at` string, date-time: When the phone reported it had this outgoing message. Absent for a received message, and for one the phone never got.
  - `api_key_id` string: The API key that sent this message. Absent for a message a signed-in user sent, a received message, and one sent before senders were recorded.
  - `body` string, required: The message text: every text part, in order, joined with a newline. Empty for a message with no text.
  - `channel` 'sms' | 'mms' | 'rcs', required: How the message travelled: sms (plain text), mms (multimedia, including group texts and some long texts), or rcs. More channels may be added; treat a value you don't know as a channel you don't handle.
  - `conversation_id` string, required: The conversation this message is in: GET /conversations/{conversation_id} reads it, and its messages are at GET /conversations/{conversation_id}/messages.
  - `created_at` string, date-time, required: When the platform stored the message. Lists sort and filter on this time.
  - `deleted_at` string, date-time: When the message was deleted. Present only on a deleted message, which GET /messages/{message_id} still returns with no body or parts; lists and conversations leave it out.
  - `delivered_at` string, date-time: When a message this phone sent was delivered. Absent until then, and for a received message.
  - `direction` 'inbound' | 'outbound', required: inbound for a message the phone received, outbound for one it sent.
  - `error` string: Why an outbound message failed or is unconfirmed, in words. Empty otherwise.
  - `error_code` 'phone_unreachable' | 'no_result' | 'policy_off' | 'expired' | 'no_subscription' | 'no_service' | 'radio_off' | 'carrier_rejected' | 'phone_rate_limited' | 'media_fetch_failed' | 'connection_lost' | 'queue_full' | 'send_failed': Why an outbound message failed or is unconfirmed, as a code to branch on: phone_unreachable (the phone never got it before its deadline; it did not go out), no_result (unconfirmed: the phone had it but has not reported), policy_off (the phone's sending switch is off), expired (its deadline passed before the phone could send it), no_subscription (no SIM line), no_service (no mobile service or data), radio_off, carrier_rejected, phone_rate_limited (Android's outgoing-message limit on the phone), media_fetch_failed (the phone could not download the attachment), connection_lost (the phone lost its connection before sending; it did not go out), queue_full (the phone was too busy), or send_failed (any other failure; error has the detail). Empty when error is. Absent on a failure reported by older phone software.
  - `failed_at` string, date-time: When a message this phone sent failed. Absent unless its status is failed.
  - `from` string, nullable, required: Sender: an E.164 number, a short code, or an alphanumeric sender id. Null only when the sender is this phone's own SIM and the phone does not know its number.
  - `id` string, required: Message identifier.
  - `is_group` boolean, required: True for a group message (more than one recipient).
  - `parts` PhoneMessagePart[], nullable, required: The message content in order: text and media. A plain SMS has one text part.
    - `file_id` string: The file holding the media, in the organization's file library, where the file API returns a short-lived download link. Present on media parts.
    - `mime_type` string: The attachment's content type, for example image/jpeg. Present on media parts.
    - `name` string: The attachment's filename as the sender's phone named it. Present on media parts.
    - `size_bytes` integer: The attachment's size in bytes. Present on media parts.
    - `text` string: The text. Present on text parts.
    - `type` 'text' | 'media', required: text for a run of message text; media for an attachment. More part types may be added; skip a part whose type you don't know.
  - `phone_deletion` PhoneMessagePhoneDeletion: What the delete did to the copy on the phone itself.
    - `next_check_at` string, date-time, nullable, required: When Axilio next checks this delete: it asks the phone again if the phone can delete and the 7 days after the delete aren't over, or settles it. Null once the outcome is final: deleted, not_found, ambiguous, not_matched and not_sent at once, unconfirmed when the 7 days run out; message.phone_deleted or message.phone_delete_failed fires then.
    - `reason` string, required: A human-readable explanation of status.
    - `status` 'pending' | 'deleted' | 'not_found' | 'ambiguous' | 'not_default_app' | 'not_matched' | 'failed' | 'unconfirmed' | 'not_sent', required: pending (the phone has been asked and has not answered yet), deleted (the phone deleted its copy), not_found (the phone has no copy), ambiguous (an older text the phone cannot tell apart from an identical one; left on the phone), not_default_app (the phone is not set up to delete messages yet; it is asked once it can), not_matched (the phone stored this message before it became the phone's messaging app and could not identify it; its copy may still be there), failed (the phone tried and failed; it is asked again), unconfirmed (the phone has not confirmed the delete: the request could not be sent, or 7 days passed without an answer; its copy may still be there), or not_sent (the organization no longer rents the phone, so nothing was sent). next_check_at is null once the outcome is final. More values may be added.
  - `phone_id` string, required: The phone that received or sent the message.
  - `received_at` string, date-time, nullable, required: When this phone received the message, by the phone's clock, to the millisecond. Null for a message the phone sent.
  - `sent_at` string, date-time, nullable, required: When the message was sent. For a received message, the sending network's clock (SMS carries whole seconds); for a message this phone sent, when the platform learned the network accepted it. Null for a message not sent yet.
  - `status` 'queued' | 'sent' | 'delivered' | 'failed' | 'unconfirmed': The delivery state of a message this phone sent: queued (accepted and issued to the phone), sent (the network accepted it), delivered (the recipient acknowledged it), failed, or unconfirmed (the phone had it but has not reported whether it went out; do not resend automatically, it may still turn sent or failed). Empty for a received message. More statuses may be added; treat one you don't know as still in progress.
  - `to` string[], nullable, required: Every recipient, as E.164 numbers. For a one-to-one inbound message this is the phone's own number; a group message lists every recipient. Empty when the only recipient is this phone's own SIM and the phone does not know its number.
  - `truncated` boolean, required: True when the text was longer than 5000 characters and was cut to that length.
  - `user_id` string: The signed-in user who sent this message, from the dashboard or the CLI. Absent for a message sent with an API key, a received message, and one sent before senders were recorded.

## Other responses

- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

## Changes

- **2026-10-24** `ecca093572e0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/axilioai/apis/axilio-api-2/changes/messages/:message_id/get.md)

---

[API](https://skmtc.dev/axilioai/apis/axilio-api-2.md) - [All operations](https://skmtc.dev/axilioai/apis/axilio-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/axilioai/apis/axilio-api-2/revisions/62aa324803a7?raw)
