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

# Quickstart

> Verify a domain, create an API key, and send your first email with the API or any SDK.

This guide takes you from a new account to your first delivered email. It takes about 15 minutes, most of which is DNS propagation.

## 1. Add your sending domain

Sending from a domain you haven't verified returns `403`. Verification also protects your shared sending reputation, so it's required.

1. Open the dashboard and add your domain, for example `yourdomain.com`.
2. SendFlit shows three DNS records. Publish all of them at your DNS provider:

| Type | Host | Purpose |
| - | - | - |
| `TXT` | `sendflit._domainkey.yourdomain.com` | DKIM. Signs your outgoing mail with a 2048-bit key unique to your domain. |
| `TXT` | `yourdomain.com` | SPF. Authorizes SendFlit to send for your domain. |
| `TXT` | `_dmarc.yourdomain.com` | DMARC. Sets your policy for failed checks and sends aggregate reports. |

3. Verify the domain once the records are live:

```bash theme={null}
curl -X POST https://api.sendflit.com/v1/domains/<domain_id>/verify \
  -H "Authorization: Bearer $SENDFLIT_KEY"
```

## 2. Create an API key

Create a key in the dashboard. Keys look like `re_...` and have one of three scopes:

| Scope | Can do |
| - | - |
| `full` | Everything, including key and domain management. |
| `sending` | Send email and read its delivery status. |
| `read` | Read-only. Cannot send. |

Give each service its own key with the smallest scope it needs. A key is shown once at creation and stored only as a SHA-256 hash, so save it when you create it. To rotate a key, create a replacement, deploy it, then revoke the old key with `DELETE /v1/keys/<id>`. Revocation is immediate.

Store the key in an environment variable or secret manager, never in source code or client-side code.

## 3. Send your first email

<Tabs>
  <Tab title="API">
    ```bash theme={null}
    curl -X POST https://api.sendflit.com/v1/email \
      -H "Authorization: Bearer $SENDFLIT_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "from": "hello@yourdomain.com",
        "to": "you@example.com",
        "subject": "Hello from SendFlit",
        "html": "<p>It works.</p>"
      }'
    ```
  </Tab>

  <Tab title="Node.js">
    ```js theme={null}
    import SendFlit from "@sendflit/sdk";

    const sendflit = new SendFlit({ apiKey: process.env.SENDFLIT_API_KEY });
    const { id } = await sendflit.send({
      from: "hello@yourdomain.com",
      to: "you@example.com",
      subject: "Hello from SendFlit",
      html: "<p>It works.</p>",
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from sendflit import SendFlit

    sf = SendFlit(api_key=os.environ["SENDFLIT_API_KEY"])
    res = sf.send(
        from_="hello@yourdomain.com",
        to="you@example.com",
        subject="Hello from SendFlit",
        html="<p>It works.</p>",
    )
    print(res["id"])
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    sfl := sendflit.New(os.Getenv("SENDFLIT_API_KEY"))
    res, err := sfl.Send(ctx, sendflit.Email{
        From:    "hello@yourdomain.com",
        To:      "you@example.com",
        Subject: "Hello from SendFlit",
        HTML:    "<p>It works.</p>",
    })
    ```
  </Tab>
</Tabs>

A successful response includes the email `id`. Save it so you can check delivery. The Ruby, PHP, Java, and .NET SDKs have the same shape: see their [SDK pages](/sdks/node).

## 4. Check delivery

```bash theme={null}
curl https://api.sendflit.com/v1/emails/<email_id> \
  -H "Authorization: Bearer $SENDFLIT_KEY"
```

An email moves through these events: `sent` (accepted by our sending infrastructure), `delivered` (accepted by the recipient's server), and possibly `opened`, `clicked`, `bounced`, `complained`, `unsubscribed`, or `failed`. To receive these as they happen, set up a [webhook](/reference/webhooks).

## Next steps

* [Errors, retries and limits](/reference/errors): handle failures and safe retries.
* [Webhooks](/reference/webhooks): receive delivery events.
* Pick an [SDK](/) for your language.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.