# Email API for developers

> Email API for developers: send email from Node.js, Python, PHP, Go, Java and more with a REST API. Tutorials, docs and email API comparisons in one place.

Canonical: https://www.cresca.xyz/developers

Cresca is an email API for developers that sends your app’s password resets, receipts and verification codes from your own domain, with one POST request. This page collects everything you need: a first request, tutorials for eleven languages and frameworks, the API docs, guides on deliverability, and comparisons with other email APIs.

[Read the quickstart](https://www.cresca.xyz/docs/quickstart) [Get an API key](https://app.cresca.xyz/signup)

Quickstart

## Send your first email with the API

1. 1\. Verify your domain. Add the ownership, DKIM and MAIL FROM records Cresca shows you to your DNS.
2. 2\. Create an API key. Use a sending-access key and keep it on your server.
3. 3\. Send a request. POST to `/emails` and keep the returned ID to check the email’s status.

Full reference: [Send email](https://www.cresca.xyz/docs/api-reference/send-email) · [Authentication](https://www.cresca.xyz/docs/authentication) · [Rate limits](https://www.cresca.xyz/docs/rate-limits)

```
curl -X POST 'https://api.cresca.xyz/api/v1/emails' \
  -H 'Authorization: Bearer cr_live_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": "Acme <hello@acme.com>",
    "to": ["user@example.com"],
    "subject": "Welcome to Acme",
    "html": "<p>Thanks for signing up.</p>"
  }'
```

Tutorials

## Send email from your language

Each tutorial takes you from an empty project to a delivered email, with working code.

- [Send email with Node.js A reusable module with timeouts, attachments, batches of 100 and an Express route Read tutorial](https://www.cresca.xyz/blog/send-email-nodejs)
- [Send email with Next.js A Route Handler contact form, a Server Action, templates and attachments Read tutorial](https://www.cresca.xyz/blog/send-email-nextjs)
- [Send email with Python A requests Session with retries, templates, attachments and batches Read tutorial](https://www.cresca.xyz/blog/send-email-python)
- [Send email with Django Keep calling send\_mail(), or call the API from a Celery task Read tutorial](https://www.cresca.xyz/blog/send-email-django)
- [Send email with PHP A reusable cresca() function, templates, attachments and a contact form Read tutorial](https://www.cresca.xyz/blog/send-email-php)
- [Send email with Laravel A service class, your existing Mailables, queued sends and templates Read tutorial](https://www.cresca.xyz/blog/send-email-laravel)
- [Send email with Ruby A client with timeouts and retries, templates, batches and a Sidekiq job Read tutorial](https://www.cresca.xyz/blog/send-email-ruby)
- [Send email with Ruby on Rails An API client in lib/, your existing mailers, attachments and batches Read tutorial](https://www.cresca.xyz/blog/send-email-rails)
- [Send email with Go A small client with retries, templates, attachments and an HTTP handler Read tutorial](https://www.cresca.xyz/blog/send-email-golang)
- [Send email with Java A reusable client with retries, templates, batches and Spring Boot Read tutorial](https://www.cresca.xyz/blog/send-email-java)
- [Send email with C# and .NET A typed client with retries, ASP.NET Core registration and batches Read tutorial](https://www.cresca.xyz/blog/send-email-csharp)

Choosing

## How to choose an email API

Eight questions to ask any email API before you wire it into your app, and where Cresca stands on each.

Can it send from your own domain?

Mailbox providers judge your domain, so the API should authenticate it with SPF and DKIM and support a DMARC policy.

Cresca: Cresca verifies your domain with ownership, DKIM and MAIL FROM records and sends from it.

What does it cost at your volume?

Prices are per email, per month or per plan. Work out the cost at the volume you expect next year, not just the free tier.

Cresca: Free for 30 days, then from $29/month for 7,500 emails, with campaigns included.

REST API or SMTP?

A REST API gives you structured errors, batch sends and idempotency. SMTP is a drop-in for software that only speaks SMTP.

Cresca: Cresca is REST today. SMTP relay is on the roadmap.

How do you learn what happened to an email?

Delivered, bounced and complained events tell you when a password reset never arrived. Check whether you poll for them or receive webhooks.

Cresca: Each email reports its latest event as last\_event, with the timeline in the dashboard. Outbound webhooks are on the roadmap.

Are retries safe?

Networks fail. An idempotency key lets you retry a request without sending a second receipt.

Cresca: Send an Idempotency-Key header and a retry returns the first result.

Can non-developers edit templates?

If every copy change needs a deploy, templates end up in your codebase. An editor lets the rest of the team change them.

Cresca: Templates are designed in the browser, versioned and sent by alias with your values.

What are the rate limits?

Bursts such as a signup spike or a nightly batch need enough requests per second.

Cresca: Free 2, Professional 10, Premium 20 and Ultra 50 requests per second; a batch carries up to 100 emails.

Where will marketing email live?

Newsletters usually come later. A second provider means a second domain setup, bill and suppression list.

Cresca: Cresca sends AI-designed campaigns from the same account and domain as your app email.

Guides

## Email sending guides

- [Transactional email API guide](https://www.cresca.xyz/blog/transactional-email-api)

    API keys, batches, templates, statuses, rate limits and errors, with code.

- [SMTP vs API](https://www.cresca.xyz/blog/smtp-vs-api-sending)

    Which to use for sending email, and when SMTP still makes sense.

- [Transactional vs marketing email](https://www.cresca.xyz/blog/transactional-vs-marketing-email)

    What US law and mailbox providers expect, and how to split the two.

- [Transactional email templates](https://www.cresca.xyz/blog/transactional-email-templates)

    Ten examples to copy, from password resets to receipts.

- [Gmail and Yahoo sender requirements](https://www.cresca.xyz/blog/gmail-yahoo-sender-requirements)

    Who counts as a bulk sender, and a checklist for meeting the requirements.

- [SPF, DKIM and DMARC](https://www.cresca.xyz/blog/email-deliverability-spf-dkim-dmarc-done-right)

    What each record does, the failure modes, and a DMARC rollout order.

- [Why emails go to spam](https://www.cresca.xyz/blog/why-emails-go-to-spam-and-how-to-fix-it)

    25 reasons emails land in spam, and a checklist to fix them.

- [Send email API overview](https://www.cresca.xyz/blog/send-email-api)

    POST /emails, batches, retrieving, listing, scheduling and canceling emails.

Compare

## Compare email APIs

- [Resend alternative](https://www.cresca.xyz/resend-alternative)
- [Postmark alternative](https://www.cresca.xyz/postmark-alternative)
- [SendGrid alternative](https://www.cresca.xyz/sendgrid-alternative)
- [Mailgun alternative](https://www.cresca.xyz/mailgun-alternative)
- [Cresca vs Amazon SES](https://www.cresca.xyz/compare/cresca-vs-amazon-ses)
- [Best transactional email services](https://www.cresca.xyz/blog/best-transactional-email-services)
- [Best Amazon SES alternatives](https://www.cresca.xyz/blog/best-amazon-ses-alternatives)

FAQs

## Email API questions

What is an email API?

An email API lets your code send email with an HTTP request instead of an SMTP connection. You send the sender, recipients, subject and content as JSON, and the API returns an ID you can use to check the email’s status.

How do I send email from my app with Cresca?

Verify your domain, add a sender and create an API key in Cresca, then send a POST request to https://api.cresca.xyz/api/v1/emails with from, to, subject and html, or with a published template and its variables.

Which languages does the Cresca email API support?

Any language that can make an HTTPS request. There are step-by-step tutorials for Node.js, Next.js, Python, Django, PHP, Laravel, Ruby, Rails, Go, Java and C#.

Does Cresca support SMTP or webhooks?

Not yet. SMTP relay and outbound webhooks are on the roadmap. Today you send through the REST API and read each email’s status as last\_event or in the dashboard.

Is the email API included in every plan?

Yes. API email shares your plan’s monthly email allowance with your campaigns. The Free plan includes the API for 30 days, and Professional is $29/month for 7,500 emails.
