# Quickstart

> Send your first email with SNDR in a few minutes.

Source: https://sndr.sh/docs/getting-started

You need a SNDR account, a domain whose DNS you can edit, and an API key.

### 1. Create an account

Sign up at [app.sndr.sh](https://app.sndr.sh/register). The free plan includes 3,000 emails a month, no card needed.

### 2. Add and verify a domain

In **Domains**, add a subdomain such as `mail.acme.com` and copy the DNS records SNDR shows you into your DNS provider. See [Domains](https://sndr.sh/docs/domains).

### 3. Create an API key

In **API keys**, create a key with the `send` scope. It is shown once, so keep it in an environment variable:

![The Create API key dialog with a name, the Live environment, and the send and read scopes selected.](https://sndr.sh/docs/images/create-api-key.webp)

```bash
export SNDR_API_KEY="sndr_live_..."
```

### 4. Send an email

cURL:

```bash
curl -X POST https://api.sndr.sh/v1/send \
  -H "Authorization: Bearer $SNDR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme <hello@mail.acme.com>",
    "to": ["customer@example.com"],
    "subject": "Hello from SNDR",
    "html": "<p>It works.</p>"
  }'
```

Node.js:

```js
import { Sndr } from '@rkiza/sndr';

const apiKey = process.env.SNDR_API_KEY;
if (!apiKey) throw new Error('Set SNDR_API_KEY');
const sndr = new Sndr(apiKey);

const email = await sndr.emails.send({
  from: 'Acme <hello@mail.acme.com>',
  to: 'customer@example.com',
  subject: 'Hello from SNDR',
  html: '<p>It works.</p>',
});

console.log(email.id); // eml_...
```

Python:

```python
import os
import requests

res = requests.post(
    "https://api.sndr.sh/v1/send",
    headers={"Authorization": f"Bearer {os.environ['SNDR_API_KEY']}"},
    json={
        "from": "Acme <hello@mail.acme.com>",
        "to": ["customer@example.com"],
        "subject": "Hello from SNDR",
        "html": "<p>It works.</p>",
    },
)
res.raise_for_status()
print(res.json()["id"])
```

Go:

```go
body := strings.NewReader(`{
  "from": "Acme <hello@mail.acme.com>",
  "to": ["customer@example.com"],
  "subject": "Hello from SNDR",
  "html": "<p>It works.</p>"
}`)

req, _ := http.NewRequest("POST", "https://api.sndr.sh/v1/send", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SNDR_API_KEY"))
req.Header.Set("Content-Type", "application/json")

res, err := http.DefaultClient.Do(req)
```

### 5. Check the result

You get `202 Accepted` with the email `id` and `status: "queued"`. Follow it in **Emails** in the dashboard, or get notified with [webhooks](https://sndr.sh/docs/webhooks).

## Next steps

- [Send email](https://sndr.sh/docs/sending): Every field, limit and option of a send.
- [Webhooks](https://sndr.sh/docs/webhooks): Get delivery and bounce events.
- [API reference](https://sndr.sh/docs/api-reference): All endpoints with examples.
- [Use with AI](https://sndr.sh/docs/ai): Give ChatGPT, Claude or Cursor the docs.
