Skip to the documentation
API

Quickstart

A key and a first send.

1. Create a key

  1. Open Settings → API keys. The page is only there if you own the mailbox.
  2. Name it after whatever will use it. That name is how you find it again when something has to be revoked.
  3. Choose its scopes. Sending only, by default.
  4. Optionally narrow what it may send as: whole domains, single addresses, or both. A whole domain covers addresses added to it later.
  5. Copy the key. It is shown once and is not recoverable: what is stored is a one-way hash. Rotating the key later shows the replacement once in the same way.

2. Send something

npm install @openemail/sdk

Optional. Every endpoint is plain HTTP and JSON, and the curl tab below needs nothing installed at all.

curl -X POST https://api.openemail.uk/emails \  -H "Authorization: Bearer $OPENEMAIL_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "from": "Acme Billing <[email protected]>",    "to": ["[email protected]"],    "subject": "Your September invoice",    "html": "<p>Invoice attached.</p>"  }'

A 200 means it has gone. You get back an id. Keep it: it is how you retrieve the message, read its event trail, or cancel it if you scheduled it.

Getting a 403 you did not expect? GET /addresses lists exactly what this key may send as. It is almost always the send scope on the key, a domain or an address it was not given, rather than a missing domain on the workspace.