---
title: "Queue an outbound iMessage"
method: POST
path: "/messages"
tags: ["Messages"]
---

# Queue an outbound iMessage

`POST /messages`

## Request

- Base URL: `https://api.automessage.app/v1`
- URL: `https://api.automessage.app/v1/messages`
- Auth: API key in header `X-API-KEY`

Creates a draft that the on-device connector will send from the customer's
Apple ID as an iMessage (or as SMS fallback if the recipient is not on
iMessage).

## Request body

- SendMessageRequest: Exactly one of `to` or `conversationId` must be present (400 on both or neither).
  - `to` string: Recipient identifier for a 1:1 send. Phone numbers are normalized to E.164 (e.g. `+14155550123`); email addresses are accepted for Apple ID recipients. Omit when sending into an existing thread with `conversationId`.
  - `conversationId` string: Send into an existing conversation you own (its `id` from `GET /v1/conversations`), including **group chats** — the only way to message a group. The draft is then addressed by `chatGUID` with an empty `to`; a 1:1 thread resolves to its recipient handle. 404 `not_found` when the thread is not yours. A reply into an existing group never counts against the new-outreach limit.
  - `body` string, required
  - `attachments` object[]
    - `url` string, uri, required
    - `mimeType` string
  - `scheduledAt` string, date-time: Optional ISO-8601 send-at time.

## Response `202`

Message queued. When the connector will hold it instead of sending at once,
`meta.queued` says why: `outreach_limit_reached` (rolling-24h new-outreach cap;
`limit`, `used`, `resumesAt`), `send_paused` (the account's sending is paused —
after several sends failed to deliver, by the burst detector, or by hand; a
human resumes from the dashboard unless `resumesAt` is set) or
`thread_delivery_failing` (the last message into that conversation was not
delivered; held until they reply or Messages' own retry lands). Never a 429.

- Message
  - `guid` string, required: Apple chat.db message GUID.
  - `conversation` string, required
  - `body` string, required
  - `outbound` boolean, required: True if we sent it.
  - `contact` string: E.164 phone or email of the counterparty.
  - `reference` string, nullable: Message this replies to, if any.
  - `deliveredAt` string, date-time, nullable
  - `delivered` boolean, nullable: Outbound only: chat.db is_delivered — a recipient device acknowledged it (connector 0.2.22).
  - `deliveryError` integer, nullable: Outbound only: Apple's non-zero message.error when Messages could not deliver it; the matching draft then has sendError "not_delivered…".
  - `readAt` string, date-time, nullable
  - `createdAt` string, date-time, required

## Other responses

- `400`: The request was malformed.
- `401`: Missing or invalid API key.

---

[API](https://skmtc.dev/automessage/apis/automessage-rest-api.md) · [All operations](https://skmtc.dev/automessage/apis/automessage-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/automessage/apis/automessage-rest-api/revisions/129f369dee8b?raw)
