# Resend API The Resend API is the REST interface to everything [[Resend]] does. The SDKs, the [[Resend CLI]] and the [[Resend MCP Server]] all sit on top of it, and since the [[Resend Headless Dashboard Initiative]] the goal is that every dashboard feature has an API equivalent. ## The basics - Base URL: `https://api.resend.com`. HTTPS only; plain HTTP calls are rejected - Authentication: an API key in the `Authorization` header, `Authorization: Bearer re_xxx` - A `User-Agent` header is REQUIRED. Requests without one get a `403` with error code `1010`. Most HTTP libraries set one by default, but if you build requests by hand in a minimal client, set it explicitly - Rate limit: 10 requests per second by default, per team, shared across all your API keys. It can be raised on request. Over the limit, you get a `429`. If you send many emails at once, the batch endpoint (up to 100 emails per call) keeps you well under it - Pagination: cursor-based on list endpoints - Versioning: none yet. Resend plans calendar-based version headers A minimal send looks like this: ```bash curl -X POST https://api.resend.com/emails \ -H "Authorization: Bearer $RESEND_API_KEY" \ -H "Content-Type: application/json" \ -H "User-Agent: my-app/1.0" \ -d '{ "from": "Acme <[email protected]>", "to": ["[email protected]"], "subject": "Hello", "html": "<p>It works!</p>" }' ``` `[email protected]` and `[email protected]` are Resend's sandbox sender and test recipient, so this works before you've verified a domain. ## Status codes | Code | Meaning | |---|---| | `200` | Success | | `400` | Invalid request (bad parameters) | | `401` | Missing API key | | `403` | Invalid API key (or missing `User-Agent`, code `1010`) | | `404` | Resource not found | | `429` | Rate limit exceeded | | `5xx` | Error on Resend's side | Note the split between `401` and `403`: no key at all is a `401`, a wrong key is a `403`. ## What you can call The API covers emails (send, batch, schedule, cancel, retrieve), received emails, templates, broadcasts, contacts, segments, topics, automations and events, domains, API keys, webhooks, logs and metrics. For retries, send an idempotency key with the request, so a retried call doesn't produce a duplicate email (see [[Idempotency]]). ## SDKs Official SDKs exist for [[Node.js]], [[PHP]], [[Python]], Ruby, [[Go]], [[Rust]], Elixir, Java and .NET. The docs have quickstarts for most web frameworks ([[Next.js]], Remix, Nuxt, SvelteKit, Astro, Express, Hono, [[Bun]], [[Laravel]], Symfony, Rails, Django, FastAPI, Flask, Axum, Phoenix...) and for serverless runtimes (Vercel Functions, Cloudflare Workers, Supabase Edge Functions, Deno Deploy, AWS Lambda). When an SDK isn't an option, the SMTP relay is the fallback. ## References - API reference, introduction: https://resend.com/docs/api-reference/introduction - Resend documentation: https://resend.com/docs - Docs for LLMs (llms.txt): https://resend.com/docs/llms.txt ## Related - [[Resend]] - [[Resend CLI]] - [[Resend MCP Server]] - [[Resend Agent Skills]] - [[Resend Headless Dashboard Initiative]] - [[Idempotency]]