# Email API quickstart

> Email API quickstart: verify a sending domain, add a sender, create an API key and send your first transactional email with Cresca, then check its delivery.

Canonical: https://www.cresca.xyz/docs/quickstart
Last updated: 2026-11-05

This email API quickstart takes you from a verified domain and an API key to your first transactional email in a few minutes.

## 1\. Verify a sending domain

In the Cresca app, open [Sending Domains](https://app.cresca.xyz/sending-domains), add your domain and publish the DNS records Cresca shows you (DKIM, a custom MAIL FROM domain and an ownership record). The domain becomes active once the records are verified.

Consider a subdomain for app email, such as `mail.acme.com`. It keeps the reputation of your password resets separate from your marketing campaigns.

## 2\. Add a sender

On the same page, create a sender address on the verified domain, for example `hello@acme.com`, with a display name and an optional Reply-To. The `from` address of every API email must be one of your active senders.

## 3\. Create an API key

Open [API keys](https://app.cresca.xyz/api-keys) and create a key. For a production server, choose **Sending access**: it can send email but cannot read your logs or change templates. The key is shown once, so store it in your server's environment, for example as `CRESCA_API_KEY`. See [Authentication](https://www.cresca.xyz/docs/authentication).

## 4\. Send an email

Request

```bash
curl -X POST 'https://api.cresca.xyz/api/v1/emails' \
  -H 'Authorization: Bearer cr_live_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: password-reset/user-123' \
  -d '{
  "from": "Acme <hello@acme.com>",
  "to": "user@example.com",
  "subject": "Reset your password",
  "html": "<p>Click <a href=\"https://acme.com/reset?token=abc\">here</a> to reset your password. The link expires in 1 hour.</p>"
}'
```

Response 200

```json
{
  "id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
}
```

Cresca queues the email and sends it within seconds. The `Idempotency-Key` makes the request safe to retry: if your server times out and sends it again, the second request returns the same id instead of a second email. See [Idempotency](https://www.cresca.xyz/docs/idempotency).

## 5\. Check delivery

Open [Transactional](https://app.cresca.xyz/transactional) in the app to see the email's timeline, or call the API with a full-access key:

Request

```bash
curl -X GET 'https://api.cresca.xyz/api/v1/emails/4ef9a417-02e9-4d39-ad75-9611e0fcc33c' \
  -H 'Authorization: Bearer cr_live_xxxxxxxxx'
```

The `last_event` field moves from `queued` to `sent` and then `delivered` (or `bounced`). See [Email lifecycle](https://www.cresca.xyz/docs/email-lifecycle).

## Email API quickstart: next steps

- [Design a template](https://www.cresca.xyz/docs/templates) in Cresca and send it with variables.
- Send up to 100 emails in one request with [batch sending](https://www.cresca.xyz/docs/api-reference/send-batch).
- Handle [errors](https://www.cresca.xyz/docs/errors) and [rate limits](https://www.cresca.xyz/docs/rate-limits).
- Follow a step-by-step tutorial with a copy-paste client for [Node.js](https://www.cresca.xyz/blog/send-email-nodejs) , [Python](https://www.cresca.xyz/blog/send-email-python) , [PHP](https://www.cresca.xyz/blog/send-email-php) , [Go](https://www.cresca.xyz/blog/send-email-golang) , [Ruby](https://www.cresca.xyz/blog/send-email-ruby) , [Java](https://www.cresca.xyz/blog/send-email-java) , [C#](https://www.cresca.xyz/blog/send-email-csharp) , [Next.js](https://www.cresca.xyz/blog/send-email-nextjs) , [Laravel](https://www.cresca.xyz/blog/send-email-laravel) , [Django](https://www.cresca.xyz/blog/send-email-django) or [Rails](https://www.cresca.xyz/blog/send-email-rails).

[Previous Introduction](https://www.cresca.xyz/docs) [Next Authentication](https://www.cresca.xyz/docs/authentication)

Last updated November 5, 2026. Questions? [lalit@cresca.xyz](mailto:lalit@cresca.xyz)
