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

# Messages API

List messages in a conversation and send agent or system messages.

# Messages API

Messages belong to a conversation.

```txt
/api/v1/projects/:projectId/conversations/:conversationId/messages
```

## List Messages

```bash
curl https://api.rogeriq.com/api/v1/projects/prj_123/conversations/conv_123/messages \
  -H "Authorization: Bearer riq_your_key"
```

Messages are returned in chronological order.

Query parameters:

| Parameter | Description |
| --- | --- |
| `cursor` | Pagination cursor. |
| `limit` | Page size, default 100 and max 100. |

## Send a Message

```bash
curl https://api.rogeriq.com/api/v1/projects/prj_123/conversations/conv_123/messages \
  -H "Authorization: Bearer riq_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Thanks for reaching out. We are checking this now.",
    "sender_type": "agent",
    "is_internal": false
  }'
```

## Internal Notes

Set `is_internal` to true for an internal note.

```json
{
  "content": "Customer likely needs billing owner approval.",
  "sender_type": "agent",
  "is_internal": true
}
```

## Sender Type

The public API accepts `agent` and `system` sender behavior. Other sender types are produced by customer, AI, or platform runtime flows.

## Webhooks

Creating a message emits `message.created` webhooks when matching webhooks are configured.