Inbound
More ways to use this page
Claim a domain for an inbound stream
POST/v1/
TypeScript sendora
Python sendora
Key sk_… a server key
Claims the domain for one of the server’s inbound streams and answers the two DNS records to add: an MX that brings the domain’s mail to Sendora and a TXT record that proves the claim. Mail to any address on the domain is accepted once both records are seen, which Sendora checks on its own and on request. A stream holds one domain; the first account to verify a name holds it.
Request body
streamIdstring (uuid)requiredAn inbound stream of the server.
domainstringrequiredThe domain mail is sent from, such as example.se; lower-cased and IDNA-encoded.
{
"streamId": "b7d2e4f6-1a3c-4d5e-9f80-2c4e6a8b0d1f",
"domain": "post.example.se"
}Responses
201A domain on an inbound stream and the two records it needs.
inboundDomainIdstring (uuid)requiredstreamIdstring (uuid)requiredThe inbound stream the domain delivers to.
domainstringrequiredThe domain, lower-cased and IDNA-encoded.
verifiedbooleanrequiredTrue while both records are seen; only then is mail to the domain accepted.
createdAtstring (date-time)requiredlastCheckedAtstring (date-time) or nullrequiredWhen the records were last looked up.
unverifiedAtstring (date-time) or nullrequiredWhen a verified domain lost its records. Mail to it is deferred for 72 hours from then and refused after, until the records are back.
mxobjectrequiredThe MX record that brings the domain’s mail to Sendora, at any priority.
type"MX"requiredhoststringrequiredThe name to create the record under.
valuestringrequiredThe value the record must hold.
verifiedbooleanrequiredverifiedAtstring (date-time) or nullrequired
txtobjectrequiredThe TXT record that proves the claim; it carries a value only you were shown.
type"TXT"requiredhoststringrequiredThe name to create the record under.
valuestringrequiredThe value the record must hold.
verifiedbooleanrequiredverifiedAtstring (date-time) or nullrequired
Example (23 lines)
{
"inboundDomainId": "6c2a9e1d-3f4b-4a8c-9d0e-1b2c3d4e5f60",
"streamId": "b7d2e4f6-1a3c-4d5e-9f80-2c4e6a8b0d1f",
"domain": "post.example.se",
"verified": false,
"createdAt": "2026-09-19T09:00:00.000Z",
"lastCheckedAt": null,
"unverifiedAt": null,
"mx": {
"type": "MX",
"host": "post.example.se",
"value": "10 inbound.sendora.se.",
"verified": false,
"verifiedAt": null
},
"txt": {
"type": "TXT",
"host": "_sendora-inbound.post.example.se",
"value": "sendora-inbound=7f3a9c2e5b1d4f6a8c0e2b4d6f8a1c3e",
"verified": false,
"verifiedAt": null
}
}Errors
Every error answers error, the code, and message, a sentence for a person. A code that adds fields is shown in full below the table.
| Code | Status | Meaning |
|---|---|---|
invalid_ | 400 | The body, the query or a header does not match what the route takes. |
domain_ | 400 | The name is Sendora’s own, or a return-path host; no account can receive on it. |
unauthorized | 401 | The key is missing, malformed or revoked. |
wrong_ | 403 | The key is of the other kind: a server key (sk_) where an account key (ak_) is needed, or the reverse. The message names the kind the operation takes. |
inbound_ | 409 | The stream already has a domain, or another account holds the name verified. |
stream_ | 422 | The streamId names no stream of this server. |
stream_ | 422 | The stream is archived and takes no new messages. |
invalid_request
issuesarray of objectOne entry per invalid field; absent when a header is wrong.
pathstringrequiredThe field, dotted, such as to.0.email; empty when the whole body is wrong.
messagestringrequired
Example
{
"error": "invalid_request",
"message": "The request is invalid: to.0: Invalid email address",
"issues": [
{
"path": "to.0",
"message": "Invalid email address"
}
]
}inbound_domain_exists
inboundDomainIdstring (uuid) or nullrequiredThe domain the stream already has, when that is the reason; null when another account holds the name verified.
Example
{
"error": "inbound_domain_exists",
"message": "The stream already has a domain; remove it first.",
"inboundDomainId": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}