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

# Quickstart

> Create an inbox and send your first email in five minutes.

## 1. Get an API key

Create a key from the [dashboard](https://console.sentfrom.ai) under **API keys**.
Keys look like `sf_live_…` and carry the permissions of your workspace. Keep them
secret — treat a key like a password.

<Note>Every request is authenticated with `Authorization: Bearer sf_live_…`. See [Authentication](/authentication).</Note>

## 2. Create an inbox

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.sentfrom.ai/v1/inboxes \
    -H "Authorization: Bearer sf_live_…" \
    -H "Content-Type: application/json" \
    -d '{ "local_part": "support-bot", "display_name": "Support" }'
  ```

  ```ts TypeScript theme={null}
  const res = await fetch("https://api.sentfrom.ai/v1/inboxes", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.SENTFROMAI_API_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({ local_part: "support-bot", display_name: "Support" }),
  });
  const inbox = await res.json(); // { id, address: "support-bot@mail.sentfrom.ai" }
  ```

  ```python Python theme={null}
  import requests
  inbox = requests.post(
      "https://api.sentfrom.ai/v1/inboxes",
      headers={"Authorization": f"Bearer {KEY}"},
      json={"local_part": "support-bot", "display_name": "Support"},
  ).json()  # { "id": "...", "address": "support-bot@mail.sentfrom.ai" }
  ```
</CodeGroup>

The inbox is live immediately on the shared `mail.sentfrom.ai` domain — no DNS
setup required. (Want your own brand? See [Custom domains](/guides/custom-domains).)

## 3. Send an email

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.sentfrom.ai/v1/messages \
    -H "Authorization: Bearer sf_live_…" \
    -H "Content-Type: application/json" \
    -d '{
      "inbox_id": "INBOX_ID",
      "to": ["customer@example.com"],
      "subject": "Hello from your agent",
      "text": "Sent from AI — this email was written and sent by an agent."
    }'
  ```

  ```ts TypeScript theme={null}
  await fetch("https://api.sentfrom.ai/v1/messages", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.SENTFROMAI_API_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({
      inbox_id: inbox.id,
      to: ["customer@example.com"],
      subject: "Hello from your agent",
      text: "Sent from AI — this email was written and sent by an agent.",
    }),
  });
  ```
</CodeGroup>

The response includes the `id`, `thread_id`, and the `Message-ID` header — keep
the `thread_id` to follow the conversation.

## 4. Receive the reply

When the customer replies, SentFromAI threads it and POSTs a `message.received`
event to your webhook. Register one in two lines:

```bash theme={null}
curl -X POST https://api.sentfrom.ai/v1/webhooks \
  -H "Authorization: Bearer sf_live_…" -H "Content-Type: application/json" \
  -d '{ "url": "https://your-app.com/sentfromai", "events": ["message.received"] }'
```

The response returns a signing `secret` (once) — use it to verify deliveries. Full
flow in [Receiving email](/concepts/receiving).

<Card title="Next: explore the concepts" icon="arrow-right" href="/concepts/inboxes">
  Inboxes, sending, receiving, and threading explained.
</Card>
