API reference
Every method of the API, with its parameters, its answer and an example that was run before it was printed.
Requests
Every method is one HTTP request to the API, under /v1. The examples write the address as $OPENSEND_API_URL, which is https://api.opensend.sh on our cloud, and the key as $OPENSEND_API_KEY.
- A
GETorDELETEtakes its input in the query string. - A
POSTorPATCHtakes its input as a JSON object in the body, withContent-Type: application/json. Anything else is refused withbody_invalid. - A value in braces in a path, such as
{id}, is part of the address.
curl "$OPENSEND_API_URL/v1/emails?status=bounced&limit=20" \ -H "Authorization: Bearer $OPENSEND_API_KEY"Answers
An answer is JSON. Every object says what it is in object and carries an id. A time is an ISO 8601 string in UTC. A field that has no value is null rather than left out. The reference marks the few that can be absent as optional.
- Thing
- Id starts with
em_
- Thing
- Received email
- Id starts with
in_
- Thing
- Domain
- Id starts with
dom_
- Thing
- Template
- Id starts with
tmpl_
- Thing
- Broadcast
- Id starts with
bc_
- Thing
- Audience
- Id starts with
aud_
- Thing
- Contact
- Id starts with
con_
- Thing
- Automation
- Id starts with
auto_
- Thing
- Webhook
- Id starts with
wh_
- Thing
- Webhook event
- Id starts with
evt_
- Thing
- API key
- Id starts with
key_
- Thing
- Log entry
- Id starts with
log_
- Thing
- Member
- Id starts with
mem_
- Thing
- Workspace
- Id starts with
ws_
- Thing
- Request
- Id starts with
req_
A failed request answers with a 4xx or 5xx status and an error object. Errors lists every code.
Lists and pages
A method that lists things answers with one page of them, newest first. limit is how many you get, from 1 to 100, and 25 when you leave it out. offset is how many to skip. q keeps only what contains a text of up to 40 characters.
{ "object": "list", "data": [ { "object": "email", "id": "em_04", "from": "Acme <hello@mail.example.com>", "to": [ "margaret@example.net" ], "subject": "Welcome aboard", "status": "bounced", "mode": "live", "domain": "mail.example.com", "cc": [], "bcc": [], "replyTo": null, "scheduledAt": null, "createdAt": "2026-11-27T06:30:00.000Z" } ], "total": 1, "hasMore": false}total is how many there are in all, and hasMore says whether another page follows. To read everything, raise offset by limit until hasMore is false.
Some lists take a period: range is today, week, month, year, all or custom, and custom needs from and to as dates. The suppression list is the one list with a cursor, explained in Suppressions.
Safe retries
A read can always be repeated. To repeat a send safely, give it a key of your own in the idempotency-key header: a repeat with the same key answers with the first result and sends nothing. Sending email has the rules.
Request ids
Every answer has a x-request-id header, and an error repeats it as requestId. Send the header yourself and your value is used. Quote it when you report a problem: it finds the request in the server logs.
Requests made with a key are also kept as log entries, with the path, the status and how long each took.
For tools
GET /v1/openapi.jsonis the whole API as an OpenAPI document. It needs no key.GET /v1/healthanswers when the API is up. It needs no key.- The method catalog lists every method with its schemas, as the API itself.
This reference, the OpenAPI document, the SDK, the command line and the MCP tools are all written from the same list of methods, so they cannot disagree.
Resources
- Emails6 methodsSend one email or a batch, schedule it for later, and read what happened to it.
- Received emails2 methodsMail that arrived on your domains, with its text, its HTML and a list of its files.
- Domains6 methodsThe domains you send from and receive on, their DNS records and their tracking settings.
- Templates15 methodsEmails you keep and reuse. A template has variables, and it is sent in the version you published.
- Images5 methodsThe images of your emails, served from here. One is copied from its address, so it keeps loading when it moves or goes away on its own site, or uploaded as a file.
- Broadcasts8 methodsOne email for a whole audience, sent now or at a time you choose.
- Audiences7 methodsThe lists your broadcasts go to.
- Contacts5 methodsThe people of the workspace, each once, with their properties, their audiences and whether they still want your mail.
- Contact properties5 methodsThe values a contact can hold, such as a plan: each with a type, and a fallback for contacts who have none.
- Topics5 methodsThe kinds of mail a reader can say yes or no to. A broadcast on a topic only reaches those who get it.
- Suppressions3 methodsThe addresses nothing is sent to, because they bounced, complained or you put them there.
- Automations11 methodsFlows that start from a trigger and walk each person through emails, waits and conditions. You edit a copy, and publishing makes it the one that runs.
- Runs4 methodsOne run for each time a person goes through an automation: where they are, and what every step did.
- Events6 methodsWhat your app tells the workspace about a person. An event starts automations, lets waiting runs go on, and can end them.
- Webhooks6 methodsAddresses of yours that are told, with a signed request, when something happens to an email.
- Metrics1 methodWhat you sent, counted by day and by domain, with the rates.
- Logs2 methodsThe requests your API keys made, each with its answer.
- API keys4 methodsThe keys a program calls this API with.
- Imports5 methodsBring an account over from Resend: its domains, contacts, templates, webhooks and more, with a report of what came and what did not.
- Workspace3 methodsThe workspace itself: its name, plan, usage, limits and unsubscribe page.
- Members4 methodsThe people in the workspace and what each one may do.
- Billing4 methodsThe plans, a checkout for a new plan, the customer portal and the invoices.
- Server2 methodsThe server itself, where a team hosts the product: whether anybody may sign up, and what each workspace on it may use.
- Account1 methodWho is calling: the key or the person behind a request, and what it may do.
- Methods1 methodThis API described as data: every method with its schemas, for tools that build on it.
- Assistant5 methodsAsk about the workspace in plain words. A change it wants to make comes back as a proposal to confirm.