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

# Messages

> Read SMS received on an agent's phone number.

# Messages

AgentLine numbers receive SMS; sending SMS is not supported.

Read received texts from message history or from `sms.received` events.

JavaScript examples call `https://api.agentline.cloud` with `fetch` and a
Bearer `al_live_...` key. The Node package is not on npm.

## List messages and conversations

<CodeGroup>
  ```python theme={null}
  client.messages.list(agent_id=agent.id, limit=50)
  client.messages.list_conversations(agent_id=agent.id)
  ```

  ```javascript theme={null}
  const headers = { Authorization: "Bearer al_live_..." };

  await fetch(
    `https://api.agentline.cloud/v1/messages?agent_id=${agent.id}&limit=50`,
    { headers },
  );
  await fetch(
    `https://api.agentline.cloud/v1/messages/conversations?agent_id=${agent.id}`,
    { headers },
  );
  ```
</CodeGroup>

`GET /v1/messages` returns received texts and stored history. Each entry includes
direction, phone numbers, body, and delivery status.

Inbound messages also arrive through your agent's
[webhook](/guides/webhooks) or the [events](/guides/events) mailbox as
`sms.received`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.