# API reference

Read and change everything in your dimmi workspace over HTTPS using our JSON REST API.

The dimmi REST API lives at `https://trydimmi.com/api/v1` (or `https://<your-domain>/api/v1` when self-hosting). Every request and response uses JSON, and every reference page here is built from the exact OpenAPI contract behind our SDKs.

<Endpoint method="GET" path="/api/v1/conversations" />

## Authentication

Create an API token in **Settings → API tokens** and send it in the `Authorization` header. Each token only gets the [abilities](/developers/api/abilities/) you pick, and every endpoint lists the ability it requires.

```bash
curl https://trydimmi.com/api/v1/me \
  --header "Authorization: Bearer $DIMMI_TOKEN"
```

## Pagination

List endpoints return a `data` array and a `meta` object. Pass `meta.next_cursor` back as `cursor` to read the next page.

<Param name="cursor" type="string">Cursor from `meta.next_cursor` for the next page.</Param>
<Param name="per_page" type="integer" default="25">Items per page, up to 100.</Param>

## Errors

When a request fails, dimmi returns a `4xx` or `5xx` status code with a clear message and machine-readable `code`.

```json
{
  "message": "The body field is required.",
  "code": "validation_failed",
  "errors": { "body": ["The body field is required."] }
}
```

<Callout type="tip">
  Send an `Idempotency-Key` header on supported `POST` requests. If your network retries the same key, dimmi returns the original response instead of creating a duplicate. See [Idempotency](/developers/api/idempotency/).
</Callout>

## Browse the API

<CardGrid>
  <Card title="Conversations" icon="chat-3" href="/api-reference/conversations/list-conversations/">Threads, messages, replies, views, and tags.</Card>
  <Card title="Contacts and companies" icon="contacts-book" href="/api-reference/contacts-and-companies/list-contacts/">Customers, companies, attributes, and audiences.</Card>
  <Card title="AI agent" icon="sparkling-2" href="/api-reference/ai-agent/get-ai-agent/">Agent settings, actions, knowledge, and procedures.</Card>
  <Card title="Webhooks" icon="webhook" href="/api-reference/webhooks/list-webhook-endpoints/">Webhook endpoints, deliveries, and event types.</Card>
</CardGrid>

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
