> For the complete documentation index, see [llms.txt](https://docs.sedona.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sedona.fun/send-messages.md).

# Send messages

[← Back to dashboard](https://www.sedona.fun/dashboard/api-keys)

> Warning: sending is a live production mutation. Run the read-only example first, select an explicitly authorized line and recipient, and keep one stable idempotency key for one logical send.

The repository example refuses to open a client unless every value is present and the explicit confirmation sentinel is set:

```sh
FLEET_BASE_URL=https://fleet-api-production-fleet-api.up.railway.app \
FLEET_API_KEY=fleet_sk_REDACTED \
FLEET_LINE_ID=<authorized-line-id> \
OPENBLUE_RECIPIENT_PHONE=<recipient-phone> \
OPENBLUE_MESSAGE_TEXT=<message> \
OPENBLUE_IDEMPOTENCY_KEY=<stable-logical-send-key> \
OPENBLUE_CONFIRM_LIVE_SEND=send-one-imessage \
npm run example:send
```

The focused call is:

```ts
import { Address } from "openblue";

const result = await client.messages.send(
  Address.phone(process.env.OPENBLUE_RECIPIENT_PHONE!),
  process.env.OPENBLUE_MESSAGE_TEXT!,
  {
    fromLineId: process.env.FLEET_LINE_ID!,
    idempotencyKey: process.env.OPENBLUE_IDEMPOTENCY_KEY!,
    transportPolicy: "require_imessage",
  },
);
```

## Interpret the result

* `accepted` means Fleet admitted the message. It does not mean delivered.
* `duplicate` means Fleet found the same idempotency key. Fleet does not store a request-body fingerprint, so the returned row belongs to the original request and may not match the current body.
* `outcome_unknown` means the request may have dispatched but no result was observed. Do not issue a new mutation with a new key. Reconcile first.
* delivery, read, and failure are later observations from message history, events, or verified webhooks.

`require_imessage` passes for Fleet because the pinned production router has no non-iMessage send route. This structural guarantee does not invent a transport observation: the result remains `actual: "unknown"` and `source: "not_reported"` until Fleet reports otherwise.

See [Safety semantics](/safety-semantics.md) for error handling.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sedona.fun/send-messages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
