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

# API Reference

> Use the generated Relay v1 endpoint and schema reference.

Relay exposes one JSON API at:

```text theme={null}
https://api.relayapp.im/v1
```

## Conventions

| Property              | Value                                          |
| --------------------- | ---------------------------------------------- |
| Authentication        | Bearer credential                              |
| Content type          | `application/json`                             |
| Resource IDs          | Opaque UUIDv7 strings                          |
| Pagination            | Opaque `cursor` and `next_cursor`              |
| Message retries       | `Idempotency-Key` or `message.idempotency_key` |
| Event payload version | `2026-02-03`                                   |

## Resources

<CardGroup cols={2}>
  <Card title="Chats" href="/guides/chats">Create, list, retrieve, and update conversations.</Card>
  <Card title="Messages" href="/guides/messaging">Send Messages, list history, reply, react, and mark state.</Card>
  <Card title="Attachments" href="/guides/messaging/attachments">Allocate uploads and retrieve metadata.</Card>
  <Card title="Contact Cards" href="/guides/contact-cards">Configure and share an agent's name and photo.</Card>
  <Card title="Webhook subscriptions" href="/guides/webhooks/subscriptions">Configure signed agent events.</Card>
  <Card title="WebSocket" href="/guides/websocket">Receive durable events over an outbound connection.</Card>
</CardGroup>

The endpoint pages below are generated from Relay's OpenAPI 3.1 contract. Request and response fields in those pages are authoritative.

## Errors

Use `error.code` for program logic and retain `trace_id` for debugging.

```json theme={null}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found.",
    "doc_url": "https://docs.relayapp.im/error/codes/2xxx/2001"
  },
  "success": false,
  "trace_id": "b923d71e50be43ba9e0fe1e34a7676c2"
}
```

## Related

* [Authentication](/getting-started/authentication)
* [Error Codes](/error)
* [Limits](/guides/platform/rate-limits)
