API
Send one email to one or a few people from your own domain, and add, look up, list and unsubscribe subscribers, with plain HTTP calls. Jump to subscribers.
Before you start
- Verify your sending domain under Settings, Domains.
- Create a key under Settings, API and tick Send email. That option appears once API sending is turned on for your account.
- Call the API from a server. It does not allow calls from a browser, and a key in front-end code is a leaked key.
Authentication
Send your key as a bearer token on every request. A key is shown once when you create it; revoke it any time under Settings, API.
Authorization: Bearer nn_live_YOUR_KEYSend an email
POST /api/v1/emails with a JSON body.
| Field | Needed | What it is |
|---|---|---|
from | Required | Name <address> or an address, on a domain you have verified under Settings, Domains. |
to | Required | A list of 50 addresses or fewer. Duplicates are removed. Plain addresses only. |
subject | Required | Up to 200 characters, no line breaks. |
html | One of html or text | The message body as HTML. If you send only text, this is generated. |
text | One of html or text | The message body as plain text. If you send only HTML, this is generated. |
reply_to | Optional | One address. Defaults to the reply-to address in your account settings. |
metadata | Optional | Up to 10 text pairs. Returned when you look the email up. They are not sent to the recipient. |
tags | Optional | Up to 5 short labels for your own reporting. |
curl -X POST https://namosnotes.com/api/v1/emails \
-H "Authorization: Bearer nn_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-receipt" \
-d '{
"from": "Shop <orders@yourdomain.com>",
"to": ["buyer@example.com"],
"subject": "Your receipt",
"text": "Thanks for your order.",
"metadata": { "order_id": "ord_1042" }
}'const res = await fetch("https://namosnotes.com/api/v1/emails", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NAMOS_NOTES_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": "order-1042-receipt",
},
body: JSON.stringify({
from: "Shop <orders@yourdomain.com>",
to: ["buyer@example.com"],
subject: "Your receipt",
html: "<p>Thanks for your order.</p>",
}),
});
const { data } = await res.json(); // [{ id, to, status }]The answer is 202 with one entry per recipient. queued means it will be sent. suppressed means that address is on a suppression list (it bounced or complained before) and nothing is sent to it.
HTTP/1.1 202 Accepted
{ "data": [ { "id": "em_3f9c2a7d41b86e05a1c2", "to": "buyer@example.com", "status": "queued" } ] }Transactional email carries no unsubscribe link and no newsletter footer.
Retrying safely
Add an Idempotency-Key header (1 to 128 characters). Sending the same request again with the same key returns the first answer and sends nothing more, so a retry after a timeout cannot send twice. The key only pins the content while the email is waiting: once it has been sent (or has failed to queue) its body is deleted, and a repeat with that key returns the stored answer without comparing content. If a request fails with 503 before the email is queued, repeating it with the same key sends exactly what the repeat contains.
Look an email up
GET /api/v1/emails/{id} returns the email and its delivery events. The key needs the Send email option.
curl https://namosnotes.com/api/v1/emails/em_3f9c2a7d41b86e05a1c2 \
-H "Authorization: Bearer nn_live_YOUR_KEY"const res = await fetch(`https://namosnotes.com/api/v1/emails/${id}`, {
headers: { Authorization: `Bearer ${process.env.NAMOS_NOTES_API_KEY}` },
});
const email = await res.json();{
"id": "em_3f9c2a7d41b86e05a1c2",
"to": "buyer@example.com",
"from": "\"Shop\" <orders@yourdomain.com>",
"subject": "Your receipt",
"status": "delivered",
"created_at": "2026-10-16T14:02:11.000Z",
"metadata": { "order_id": "ord_1042" },
"events": [ { "type": "delivery", "detail": null, "occurred_at": "2026-10-16T14:02:14.000Z" } ]
}The status of a looked-up email is one of the following. The 202 only means the email was accepted: a queued email can still end up blocked or failed, so use this lookup or a webhook to find out what happened.
| Status | Meaning |
|---|---|
queued | Accepted and waiting to be sent. |
sent | Handed to the mail provider. |
delivered | The recipient's mail server accepted it. |
bounced | The recipient's mail server refused it. |
complained | The recipient marked it as spam. |
rejected | The mail provider refused to send it. |
failed | It could not be sent (for example the sending domain stopped being verified). |
blocked | It was held back at send time because the account was paused, under review or switched off. |
skipped | It was not sent because the address is suppressed. |
Subscribers
Add, look up, list and unsubscribe the people on a publication. These calls use an integration credential (starts with nn_int_), not an nn_live_ key: create one under Settings, MCP, tick Read subscribers and/or Add and unsubscribe people, and choose the publication it may use. The credential acts as you, so it stops working if you are removed or lose admin rights. Call it from a server, never from a browser.
| Call | Needs | What it does |
|---|---|---|
POST /api/v1/publications/{publicationId}/subscribers | Add and unsubscribe people | Adds a person, or sends them a confirmation email when the publication asks for one. |
GET /api/v1/publications/{publicationId}/subscribers/{email} | Read subscribers | One subscriber by address (URL-encode the @ as %40). |
GET /api/v1/publications/{publicationId}/subscribers | Read subscribers | Newest first, 25 at a time (limit up to 100), optional status, then cursor for the next page. |
POST /api/v1/publications/{publicationId}/subscribers/{email}/unsubscribe | Add and unsubscribe people | Unsubscribes and suppresses the address. Send {} as the body. |
Add a subscriber
curl -X POST https://namosnotes.com/api/v1/publications/nl_0123456789abcdef0123/subscribers \
-H "Authorization: Bearer nn_int_YOUR_CREDENTIAL" \
-H "Content-Type: application/json" \
-d '{ "email": "reader@example.com", "name": "Reader" }'The body takes email, an optional name and an optional welcome (true or false), nothing else. The answer is always 202 with the same body, whether the address is new, already subscribed, unsubscribed, bounced, complained or suppressed, so the call cannot be used to find out who is on your list. Adding goes through the same path as your signup form: the publication's double opt-in setting applies, and the same limits that stop list-bombing apply.
HTTP/1.1 202 Accepted
{ "data": { "accepted": true, "message": "Request accepted. If the address can be subscribed, it is; where the publication asks for confirmation, a confirmation email is sent." } }A new subscriber gets your welcome email by default. Send "welcome": false to skip it for that call. It only matters when the publication has no confirmation step; when it does, the reader's own confirmation decides.
This call can only add people it does not know. It never re-subscribes someone who unsubscribed, bounced or complained, never touches an existing subscriber, and never sends a second confirmation. Those people can only come back by signing up themselves.
Look one up
curl https://namosnotes.com/api/v1/publications/nl_0123456789abcdef0123/subscribers/reader%40example.com \
-H "Authorization: Bearer nn_int_YOUR_CREDENTIAL"{
"data": {
"id": "sub_3f9c2a7d41b86e05a1c2",
"publicationId": "nl_0123456789abcdef0123",
"email": "reader@example.com",
"name": "Reader",
"status": "pending",
"suppressed": false,
"source": "api",
"createdAt": "2026-10-18T14:02:11.000Z",
"statusChangedAt": "2026-10-18T14:02:11.000Z"
}
}status is pending, active, unsubscribed, bounced, complained or dormant. Only active people receive newsletters. suppressed is true when the address is on a suppression list, in which case nothing is sent to it whatever the status says.
List
curl "https://namosnotes.com/api/v1/publications/nl_0123456789abcdef0123/subscribers?status=active&limit=50" \
-H "Authorization: Bearer nn_int_YOUR_CREDENTIAL"
# { "data": { "items": [ ... ], "nextCursor": "MjAyNi0xMC0x..." } }
# Next page: add &cursor=<nextCursor>. nextCursor is null on the last page.Unsubscribe
curl -X POST https://namosnotes.com/api/v1/publications/nl_0123456789abcdef0123/subscribers/reader%40example.com/unsubscribe \
-H "Authorization: Bearer nn_int_YOUR_CREDENTIAL" \
-H "Content-Type: application/json" \
-d '{}'The answer is 200 with { "data": { "unsubscribed": true } } whether or not the address was subscribed. A pending, active or dormant subscriber becomes unsubscribed, and the address is added to your account's suppression list, so it is not mailed from any of your publications. Unsubscribing is a one-way door for this API.
A credential without Read subscribers never receives an email address in any answer.
Subscriber errors
These calls return the error shape { "error": { "code": "…", "message": "…", "request_id": "…" } }.
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_credential | The credential is missing, wrong, expired or revoked. |
| 403 | insufficient_scope | The credential was not created with the option this call needs (the answer names it). |
| 403 | forbidden | The person the credential acts for is no longer an owner or admin. |
| 404 | not_found | No such publication on your account or not one this credential is limited to; or, for a lookup, no subscriber with that address. |
| 422 | invalid_request | The address is not valid, a value is too long, a field is not accepted, or the cursor is not valid. |
| 429 | rate_limited | Too many requests for this credential. Wait the seconds in Retry-After. |
| 503 | integrations_disabled | The developer API (or writing through it) is switched off for this deployment. |
Errors
Email calls return errors as JSON: { "error": "invalid_key", "message": "…" }.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The body is not valid JSON, a field is missing or wrong, or a value contains a line break. |
| 401 | invalid_key | The API key is missing, wrong or revoked. |
| 403 | missing_scope | The key was not created with the Send email option. |
| 403 | api_sending_disabled | Sending email through the API is not turned on for the account. |
| 403 | sending_paused | Sending is paused for the account. |
| 403 | account_in_review | The account is under review and cannot send yet. |
| 404 | not_found | No email with that id on your account. |
| 422 | idempotency_key_reused | The Idempotency-Key was already used for a different email. |
| 422 | from_domain_not_verified | The from address is not on a sending domain you have verified. |
| 422 | too_many_recipients | More than 50 recipients in one request. |
| 422 | too_large | html and text together are over 256 KB. |
| 503 | queue_unavailable | Sending is briefly unavailable. Nothing was sent; retry the same request. |
| 503 | not_configured | Sending is not set up on this deployment. Nothing was sent. |
| 503 | service_unavailable | The email could not be stored. Nothing was sent; retry the same request. |
| 429 | rate_limited | Too many requests for this key, or the account reached its hourly sending limit. Wait and retry. |
Limits
- 60 requests a minute per key (subscriber calls cost 2 or 3 requests each). Over it you get
429and aRetry-Afterheader. - An hourly sending limit per account that starts low and rises as your account builds a clean record.
- 50 recipients per request, 256 KB of body, no attachments.
Use of the API is covered by the acceptable use policy.