Skip to the page

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 GET or DELETE takes its input in the query string.
  • A POST or PATCH takes its input as a JSON object in the body, with Content-Type: application/json. Anything else is refused with body_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
Email
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.

emails.list
{  "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.json is the whole API as an OpenAPI document. It needs no key.
  • GET /v1/health answers 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