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

# Quickstart

> Assign an agent and send your first message through the API in a few minutes.

This guide takes you from zero to sending a message in a conversation through the API.

## Prerequisites

* An Adraa Inbox workspace with at least one conversation
* An admin role in the workspace, or an API token from your admin

## Get started

<Steps>
  <Step title="Create an API token">
    In the agent console, go to **Settings → API**, select **Create token**,
    and copy the token — it's shown only once. See
    [Authentication](/authentication) for details.

    Export it in your shell so the examples below work as-is:

    ```bash theme={null}
    export ADRAA_API_TOKEN="adraa_..."
    ```
  </Step>

  <Step title="Verify the token">
    ```bash theme={null}
    curl https://api.inbox.adraa.ai/api/v1/me \
      -H "Authorization: Bearer $ADRAA_API_TOKEN"
    ```

    ```json Response theme={null}
    {
      "company": { "id": "cmbxgvq1e0000ph01a2b3c4d5", "name": "acme" },
      "token": { "id": "cmbxh1k3a0001ph01e6f7g8h9", "name": "CRM integration" }
    }
    ```
  </Step>

  <Step title="Find a conversation ID">
    Open any conversation in the agent console. The conversation ID is the
    last segment of the URL:

    ```text theme={null}
    https://app.inbox.adraa.ai/acme/conversations/cmbxgz9pq0003ph01m4n5o6p7
    ```
  </Step>

  <Step title="List your agents">
    Fetch the workspace's agents to get the ID of the agent you want to
    assign:

    ```bash theme={null}
    curl https://api.inbox.adraa.ai/api/v1/agents \
      -H "Authorization: Bearer $ADRAA_API_TOKEN"
    ```

    ```json Response theme={null}
    {
      "agents": [
        {
          "id": "cmbxgwq1e0000ph01i0j1k2l3",
          "email": "sara@acme.com",
          "nickname": "sara",
          "role": "admin",
          "isOnline": true,
          "lastSeen": "2026-06-12T10:25:00.000Z",
          "createdAt": "2026-05-02T08:14:00.000Z"
        }
      ]
    }
    ```
  </Step>

  <Step title="Assign an agent">
    Assign an agent to the conversation using an ID from the previous step,
    or pass `ai` to assign the workspace's AI agent:

    ```bash theme={null}
    curl -X POST https://api.inbox.adraa.ai/api/v1/conversations/cmbxgz9pq0003ph01m4n5o6p7/assign \
      -H "Authorization: Bearer $ADRAA_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"agentId": "cmbxgwq1e0000ph01i0j1k2l3"}'
    ```

    ```json Response theme={null}
    {
      "success": true,
      "conversationId": "cmbxgz9pq0003ph01m4n5o6p7",
      "assignment": {
        "agentId": "cmbxgwq1e0000ph01i0j1k2l3",
        "agentNickname": "sara",
        "assignedAt": "2026-06-12T10:30:00.000Z"
      }
    }
    ```

    The assignment appears in the agent console immediately.
  </Step>

  <Step title="Send a message">
    Send a message to the conversation. It's delivered on the conversation's
    channel — web chat, WhatsApp, or email — and shows in the thread as sent
    by **API**:

    ```bash theme={null}
    curl -X POST https://api.inbox.adraa.ai/api/v1/conversations/cmbxgz9pq0003ph01m4n5o6p7/messages \
      -H "Authorization: Bearer $ADRAA_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"body": "Hi! Your order has shipped and should arrive on Friday."}'
    ```

    ```json Response theme={null}
    {
      "message": {
        "id": "cmbxh2k3a0001ph01q8r9s0t1",
        "conversationId": "cmbxgz9pq0003ph01m4n5o6p7",
        "senderType": "agent",
        "body": "Hi! Your order has shipped and should arrive on Friday.",
        "status": "sent",
        "createdAt": "2026-06-12T10:31:12.000Z",
        "sender": { "id": "api:cmbxh1k3a0001ph01e6f7g8h9", "nickname": "API", "company": "acme", "role": "automation" }
      }
    }
    ```
  </Step>
</Steps>

<Check>
  The message shows up in the conversation thread in the agent console and is
  delivered to the customer on their channel.
</Check>

## Next steps

<Columns cols={2}>
  <Card title="API reference" icon="code" href="/api-reference/introduction">
    Full request and response details for every endpoint.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Token management, revocation, and security practices.
  </Card>
</Columns>
