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

# Quickstart

> Authenticate your first request and send a WhatsApp message in minutes.

This guide takes you from zero to your first WhatsApp message sent through the API.

<Steps>
  <Step title="Get your API key">
    The API key is issued from the dashboard, under **Settings → API**. It has
    the `sk_1to1_` prefix.

    <Warning>
      The API key grants full access to your business's conversations. Treat it
      as a secret — never put it in client-side code or commit it to a
      repository.
    </Warning>
  </Step>

  <Step title="Identify your business">
    Every endpoint hangs off a base URL that includes your business's `{slug}`:

    ```
    https://app.1to1.ai/api/v1/public/{slug}
    ```

    The `{slug}` is also in the API settings. The key and the `slug` must
    belong to the **same business**.
  </Step>

  <Step title="Send your first message">
    A `POST` to the text endpoint, with the conversation identified by phone:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://app.1to1.ai/api/v1/public/{slug}/conversation/messages/text" \
        -H "Authorization: Bearer sk_1to1_your_api_key" \
        -H "Content-Type: application/json" \
        -d '{
          "conversation": { "phone": "+5215512345678" },
          "body": "Hi 👋, how can I help you?"
        }'
      ```

      ```js JavaScript theme={null}
      const res = await fetch(
        "https://app.1to1.ai/api/v1/public/{slug}/conversation/messages/text",
        {
          method: "POST",
          headers: {
            Authorization: "Bearer sk_1to1_your_api_key",
            "Content-Type": "application/json",
          },
          body: JSON.stringify({
            conversation: { phone: "+5215512345678" },
            body: "Hi 👋, how can I help you?",
          }),
        },
      );
      ```

      ```python Python theme={null}
      import requests

      requests.post(
          "https://app.1to1.ai/api/v1/public/{slug}/conversation/messages/text",
          headers={"Authorization": "Bearer sk_1to1_your_api_key"},
          json={
              "conversation": {"phone": "+5215512345678"},
              "body": "Hi 👋, how can I help you?",
          },
      )
      ```
    </CodeGroup>
  </Step>

  <Step title="Handle the response">
    A `201` response confirms the send:

    ```json theme={null}
    { "message_uuid": "...", "wamid": "..." }
    ```

    Errors return `{ code, message }` with a `4xx` or `5xx` status. Both fields
    are guaranteed. Switch on `code` (stable), never on `message` (human text,
    may be refined between API versions):

    ```json theme={null}
    { "code": "WINDOW_CLOSED", "message": "..." }
    ```
  </Step>
</Steps>

<Note>
  **Rate limit:** two independent buckets of 60 requests/min per API key — one
  general (reads, tags, mailbox, notes, files) and one for messages (text,
  quick-reply, template). When exceeded you get a `429` with the `Retry-After`
  header. See [Rate limits](/en/rate-limits).
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Conversations" icon="comments" href="/en/conversations">
    How to identify a conversation and the 24h window.
  </Card>

  <Card title="Messages" icon="paper-plane" href="/en/messages">
    The four ways to send a message.
  </Card>
</CardGroup>
