Inbound email
Base URL: https://api.notideus.io. All endpoints below are under /v1 and use the error envelope on failure — see Errors.
Receive mail on your verified domains. Management is dual-auth — a session token or an API key — and requires the inbound:read / inbound:write scopes.
Receiving pipeline
Receiving is activated per domain before route creation. POST /v1/domains/:id/inbound enables it and provisions the MX record (10 inbound-smtp.<region>.amazonaws.com, or the operator's custom alias via INBOUND_MX_HOSTNAME) and SES receipt rule. Add the displayed MX at your DNS provider, then call POST /v1/domains/:id/inbound/verify (or let the periodic DNS sweep run) to mark receiving verified. Route creation returns 409 receiving_not_verified until then. DELETE /v1/domains/:id/inbound disables receiving, removes the MX guidance, and preserves existing routes, which stop matching until receiving is enabled and verified again.
Routing rules:
- An exact-address route beats a
*catch-all route on the same domain. - Routes select which mail enters the pipeline.
store: truekeeps the message in the team inbox;webhook_endpoint_idpushes aninbound.receivedevent to that endpoint — the route itself is the opt-in, no subscription needed. Both can be set. - Messages are retained for
meta.retention_days(plan-dependent) and then deleted.
For development and tests, a session-oriented endpoint POST /v1/inbound/messages/simulate (config-gated by meta.simulate_enabled) ingests a message without sending real mail.
/v1/inbound/routesScope: inbound:write — dual-auth: a session token or an API key works; the account email must be verified.
Creates one route on an existing team domain whose receiving status is verified. Adding more routes does not change the provisioned MX record or SES receipt rule.
Request fields
| Field | Type | Required | Notes |
|---|---|---|---|
domain_id | uuid | yes | An existing team domain |
recipient | string | yes | Local part — lowercase letters, digits, ._%+- — or * for a domain catch-all |
name | string | no | Display label |
store | bool | no | Keep messages in the team inbox — at least one of store / webhook_endpoint_id is required |
webhook_endpoint_id | uuid | no | Push inbound.received to this endpoint; the route is the opt-in — no subscription needed |
Response
201 Created — the new route. A real response:
Errors
- 400
bad_request—domain_idis missing,recipientis not a valid local part or*, neitherstorenorwebhook_endpoint_idis set, orwebhook_endpoint_iddoes not reference one of your endpoints. - 403
insufficient_scope— the key lacksinbound:write. - 403
email_not_verified— the account email is unverified; management resumes once it is verified. - 404
not_found— no team domain with thatdomain_id. - 409
conflict— a route for this recipient already exists on this domain.
curl -X POST https://api.notideus.io/v1/inbound/routes \
-H "Authorization: Bearer $NT_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain_id": "01a139b0-4555-7c06-bf40-b380f3a66375",
"recipient": "support",
"store": true
}'
{
"route": {
"id": "01a139b3-18c4-7f9c-bef5-076c7f55c495",
"domain_id": "01a139b0-4555-7c06-bf40-b380f3a66375",
"recipient": "support",
"name": "",
"webhook_endpoint_id": null,
"store": true,
"status": "active",
"created_at": "2026-10-14T09:16:41.028905Z",
"updated_at": "2026-10-14T09:16:41.028905Z"
}
}
/v1/inbound/routesScope: inbound:read — dual-auth: also accepts a session token.
Lists all of your routes, oldest first. There is no pagination: plan caps keep route counts small, and the response carries the full list together with meta.
Response
200 OK — data holds every route; meta carries simulate_enabled and the plan-dependent retention_days. A real response:
{
"data": [
{
"id": "01a139b3-18c4-7f9c-bef5-076c7f55c495",
"domain_id": "01a139b0-4555-7c06-bf40-b380f3a66375",
"recipient": "support",
"name": "",
"webhook_endpoint_id": null,
"store": true,
"status": "active",
"created_at": "2026-10-14T09:16:41.028905Z",
"updated_at": "2026-10-14T09:16:41.028905Z"
}
],
"meta": {
"retention_days": 90,
"simulate_enabled": true
}
}
/v1/inbound/routes/:idScope: inbound:read — dual-auth: also accepts a session token.
Path parameters
| Parameter | Type | Notes |
|---|---|---|
id | uuid | The route id |
Response
200 OK — the route. 404 Not Found — no route with that id.
/v1/inbound/routes/:idScope: inbound:write — dual-auth: a session token or an API key works; the account email must be verified.
Path parameters
| Parameter | Type | Notes |
|---|---|---|
id | uuid | The route id |
Request fields
PATCH is a full replace, not a merge — omitted fields are reset, not preserved:
| Field | Type | Required | Notes |
|---|---|---|---|
recipient | string | yes | Local part or * — same charset as create; required, an empty or invalid one is a 400 |
name | string | no | Display label; omitted (or empty) means cleared |
store | bool | no | Omitted means false — storing stops |
webhook_endpoint_id | uuid, null | no | Omitted (or null) detaches the webhook |
The store-or-webhook rule applies to the result: after the replace the route must still store, push, or both. domain_id is create-only (ignored here) and there is no status field — a patched route is always left active.
Response
200 OK — the updated route. 404 Not Found — no route with that id.
Errors
- 400
bad_request— invalidrecipient, the replaced route neither stores nor pushes, orwebhook_endpoint_iddoes not reference one of your endpoints. - 403
insufficient_scope— the key lacksinbound:write. - 403
email_not_verified— the account email is unverified. - 404
not_found— no route with that id, or its domain no longer belongs to the team. - 409
conflict— another route for the new recipient already exists on the domain.
/v1/inbound/routes/:idScope: inbound:write — dual-auth: a session token or an API key works; the account email must be verified.
Path parameters
| Parameter | Type | Notes |
|---|---|---|
id | uuid | The route id |
Response
204 No Content — the route is deleted; the body is empty. Deleting routes never deprovisions the domain's MX record or SES receipt rule. 404 Not Found — no route with that id.
/v1/inbound/messagesScope: inbound:read — dual-auth: also accepts a session token.
Lists one cursor page of the team mailbox, newest first by default. Use sort=oldest to reverse the order; the cursor remains valid in that direction.
Query parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
q | string | no | Substring match on sender name/address, recipient, and subject |
route_id | uuid | no | Restrict to one mailbox route |
folder | string | no | inbox (unfiled), starred, archive, trash, or all (everything except Trash) |
folder_id | uuid | no | Restrict to one team-owned custom folder |
unread | boolean | no | true returns unread messages only |
attachments | boolean | no | true returns messages with attachments only |
sort | string | no | newest (default) or oldest |
cursor | string | no | Taken from next_cursor of the previous page |
limit | integer | no | Page size; default 20, max 100 |
Response
200 OK — data holds the page; next_cursor is empty on the final page. A real response (?q=Capture):
{
"data": [
{
"id": "01a1e8e8-0436-78b6-8c13-3f41508b1529",
"route_id": "01a1e8e7-bc3b-75bd-8147-2ecc09ebbaa9",
"from_addr": "ada@example.org",
"from_name": "Ada Lovelace",
"to_addr": "support@track.example.com",
"subject": "Delivery webhook retries",
"text": "Hi team,\nOur endpoint recovered this morning. Can you confirm whether the delayed events were replayed?\nThanks,\nAda",
"html": "",
"headers": {
"to": "support@track.example.com",
"from": "Ada Lovelace <ada@example.org>",
"subject": "Delivery webhook retries",
"message-id": "<9ec6ac26-f561-46dc-ae5b-cf5a431ef66e@simulate.notideus>"
},
"attachments": [],
"spam_verdict": null,
"size_kb": 1,
"status": "processed",
"error": null,
"received_at": "2026-11-17T09:48:01.974476Z",
"read_at": null,
"starred": false,
"folder": "inbox",
"folder_id": null
}
],
"next_cursor": ""
}
/v1/inbound/messages/:idScope: inbound:read — dual-auth: also accepts a session token.
Path parameters
| Parameter | Type | Notes |
|---|---|---|
id | uuid | The message id |
The message
| Field | Type | Notes |
|---|---|---|
id | uuid | Stable message identifier |
route_id | uuid, null | Matching route; null when no route matched |
from_addr | string | Sender address |
from_name | string | Sender display name, empty when absent |
to_addr | string | Recipient address the mail arrived on |
subject | string | |
text | string | Plain-text body |
html | string | HTML body, empty when the mail had none |
headers | object | Parsed message headers |
attachments | object[] | {name, content_type, size_kb, key} — download via the attachment endpoint below |
spam_verdict | string, null | The provider spam verdict when one was returned |
size_kb | number | Message size in kilobytes |
status | string | received, processed or failed |
error | string, null | Processing error, set when status is failed |
received_at | timestamp | RFC 3339 |
read_at | timestamp, null | Read time; null means unread |
starred | boolean | Whether the message is starred |
folder | string | inbox, archive, or trash |
folder_id | uuid, null | Custom folder assignment; Inbox lists only unfiled messages |
Response
200 OK — the stored message. A real response:
404 Not Found — no message with that id.
{
"message": {
"id": "01a1e8e8-0436-78b6-8c13-3f41508b1529",
"route_id": "01a1e8e7-bc3b-75bd-8147-2ecc09ebbaa9",
"from_addr": "ada@example.org",
"from_name": "Ada Lovelace",
"to_addr": "support@track.example.com",
"subject": "Delivery webhook retries",
"text": "Hi team,\nOur endpoint recovered this morning. Can you confirm whether the delayed events were replayed?\nThanks,\nAda",
"html": "",
"headers": {
"to": "support@track.example.com",
"from": "Ada Lovelace <ada@example.org>",
"subject": "Delivery webhook retries",
"message-id": "<9ec6ac26-f561-46dc-ae5b-cf5a431ef66e@simulate.notideus>"
},
"attachments": [],
"spam_verdict": null,
"size_kb": 1,
"status": "processed",
"error": null,
"received_at": "2026-11-17T09:48:01.974476Z",
"read_at": null,
"starred": false,
"folder": "inbox",
"folder_id": null
}
}
/v1/inbound/messages/:idScope: inbound:write — dual-auth: also accepts a session token.
Updates only the supplied mailbox fields. read and starred are booleans. folder accepts inbox, archive, or trash. Moving to a built-in folder clears folder_id; assigning a team-owned custom folder_id files the message away from the unfiled Inbox while keeping it in All mail.
200 OK — {message} with the updated state. 400 Bad Request — no fields or invalid values. 404 Not Found — the message or custom folder is not in this team.
/v1/inbound/messages/:idScope: inbound:write — dual-auth: also accepts a session token.
Permanently deletes the row, raw MIME, and stored attachments. The message must already be in Trash. 204 No Content on success; 409 Conflict with message_not_in_trash otherwise.
/v1/inbound/foldersScope: inbound:read — dual-auth: also accepts a session token.
Returns {data, counts, route_unread}. data lists custom folders by name. counts contains inbox, unread, starred, archive, trash, and all; custom-folder mail is excluded from the unfiled Inbox count and included in All mail. route_unread maps route UUIDs to unread, unfiled Inbox counts for account switching.
/v1/inbound/foldersScope: inbound:write — dual-auth: also accepts a session token.
Creates a custom folder with {name}. Names are trimmed, 1–60 characters, and case-insensitively unique per team. 201 Created returns {folder}; a duplicate name fails with 409 Conflict.
/v1/inbound/folders/:idScope: inbound:write — dual-auth: also accepts a session token.
Renames the folder with {name} under the same validation rules. 200 OK returns {folder}; 404 Not Found means the folder is not in this team.
/v1/inbound/folders/:idScope: inbound:write — dual-auth: also accepts a session token.
Deletes the custom folder and returns its messages to Inbox. No messages or stored objects are deleted. 204 No Content on success.
Binary downloads
Two endpoints return raw bytes rather than JSON, so their bodies cannot be captured as JSON examples.
GET /v1/inbound/messages/:id/raw
The original MIME message as message/rfc822. After the retention window the raw bytes are gone — the call then fails with 404 not_found ("raw message no longer stored (retention)"), as do attachment downloads.
Example request
curl https://api.notideus.io/v1/inbound/messages/01a139b3-18e4-7cc8-a7e2-4190eca5ec20/raw \
-H "Authorization: Bearer $NT_KEY" \
-o message.eml
GET /v1/inbound/messages/:id/attachments/:n
Attachment download by 0-based index n into the message's attachments array. The response carries the attachment's content type and a Content-Disposition filename. 404 not_found when the index is out of range or the attachment has aged out of retention.
Example request
curl https://api.notideus.io/v1/inbound/messages/01a139b3-18e4-7cc8-a7e2-4190eca5ec20/attachments/0 \
-H "Authorization: Bearer $NT_KEY" \
-o attachment.bin
Both endpoints take Scope: inbound:read — dual-auth: also accepts a session token.