> ## Documentation Index
> Fetch the complete documentation index at: https://docs.relayapp.im/llms.txt
> Use this file to discover all available pages before exploring further.

# message.sent

> Read the message.sent data payload and its fields.

`message.sent` fires when a message your agent sent is committed to the chat.

## Read the payload

This is a complete envelope as the staging agent received it. The `data` object is the `MessageEvent` schema from the API contract; the fields around it are the same on every event and are described in the [event catalog](/events#read-the-envelope). Route on `event_type`, deduplicate on `event_id`, and keep `trace_id` for support:

```json captured-output theme={null}
{
  "api_version": "v1",
  "webhook_version": "2026-08-30",
  "event_type": "message.sent",
  "event_id": "01a08e1e-ca12-704b-89a0-2289178db8ea",
  "created_at": "2026-09-11T01:39:37.618Z",
  "trace_id": "2ba144b915db9a00795c3f4cda26e592",
  "agent_id": "01a05223-bd8e-7619-8a44-b7e2069a226f",
  "data": {
    "chat": {
      "id": "01a05224-50ba-743c-b078-6458f4186e07",
      "is_group": false,
      "owner_handle": {
        "id": "01a05223-bd8e-7619-8a44-b7e2069a226f",
        "handle": "example_agent",
        "status": "active",
        "joined_at": "2026-08-30T10:08:26.863Z",
        "left_at": null,
        "is_me": true,
        "kind": "agent",
        "display_name": "Example Agent",
        "image_url": null,
        "about": "A Relay agent, created with relay agents create.",
        "verified": false,
        "is_removable": true
      }
    },
    "id": "01a08e1e-c84a-725a-9931-5bd5784c3149",
    "idempotency_key": "ci_docs_connect_a91f",
    "direction": "outbound",
    "sender_handle": {
      "id": "01a05223-bd8e-7619-8a44-b7e2069a226f",
      "handle": "example_agent",
      "status": "active",
      "joined_at": "2026-08-30T10:08:26.863Z",
      "left_at": null,
      "is_me": true,
      "kind": "agent",
      "display_name": "Example Agent",
      "image_url": null,
      "about": "A Relay agent, created with relay agents create.",
      "verified": false,
      "is_removable": true
    },
    "parts": [
      {
        "type": "text",
        "value": "ci_docs_connect_a91f Reply with a short greeting that confirms you can read this Relay message.",
        "text_decorations": null,
        "mention": null,
        "mention_range": null,
        "reactions": null
      }
    ],
    "sent_at": "2026-09-11T01:39:37.162Z",
    "delivered_at": "2026-09-11T01:39:37.162Z",
    "read_at": null,
    "reply_to": null
  }
}
```

| Field             | Meaning                                                           |
| ----------------- | ----------------------------------------------------------------- |
| `chat`            | Chat ID, group flag, and the receiving agent's `owner_handle`     |
| `id`              | Message ID                                                        |
| `idempotency_key` | The sender's idempotency key, or `null`                           |
| `direction`       | `outbound` when your agent sent it, `inbound` when it received it |
| `sender_handle`   | The handle that sent the message, with `kind` `user` or `agent`   |
| `parts`           | Text, media, or link parts                                        |
| `sent_at`         | Send timestamp                                                    |
| `delivered_at`    | Delivered timestamp                                               |
| `read_at`         | Read timestamp, or `null` before Read                             |
| `silent`          | `true` when the sender sent it with no banner and no sound        |
| `reply_to`        | Referenced message and part, or `null`                            |

## Handle the event

Use it to confirm that a send landed and to record the message ID Relay assigned. `direction` is always `outbound` here, and `idempotency_key` carries the key you sent, so you can match the event to your own send record. Nothing needs a reply.

## Next steps

* [Send a message](/messages/send)
* [Read the message.delivered event](/events/message-delivered)
* [Use idempotency keys](/live/idempotency)
* [Choose an event type](/events)
