Postilio docs

API reference

Base URL https://api.postilio.eu. Every request needs an API key: Authorization: Bearer pk_live_… (or pk_test_…), see Authentication. Errors are described in Errors and limits.

This page is generated from the OpenAPI document, which you can also download for a client generator.

Usage

Get the project's usage in a month

GET /v1/usage

Needs the usage:read scope (live keys only). The key's project in one UTC month: billable is accepted minus suppressed. organization.state says where the organization stands against its plan's monthly limit this month, without its numbers. apiKey is the calling key's own month in its current project, by the day its messages were accepted; informative, never another key's. A key moved from another project counts here from the move on.

Parameters

NameInTypeRequiredDescription
monthquerystringnoyyyy-MM, a UTC month; the current month when left out.

Responses

StatusMeaningBody
200OKApiUsage
400Bad RequestHttpValidationProblemDetails

Emails

Send an email

POST /v1/emails

Needs the emails:send scope. Stores one message per recipient and answers 202 with their ids, in the order of to, cc, bcc. A recipient on the suppression list is accepted but not sent, and listed in suppressed. The sender's domain must be verified. A test key (pk_test_) never sends: its messages get simulated events. In the sandbox, live mail goes only to the organization's members and verified domains (422 sandbox_recipient_not_allowed), within a daily and a per-minute limit (429 with Retry-After). For four weeks after the sandbox a daily and a per-minute cap rise each week (429 probation_daily_limit_reached, probation_rate_limit_reached). An attachment with an executable extension (.exe, .js and the like) refuses the message (422 attachment_type_not_allowed). A project can have a daily and a per-minute limit of its own (429 project_daily_limit_reached, project_rate_limit_reached). The organization's plan limits the month, the day and the minute (429 plan_monthly_limit_reached, plan_daily_limit_reached, plan_rate_limit_reached). Only live recipients that aren't suppressed count. Apart from any plan, the platform limits each key and each project per minute and each project per day (429 platform_rate_limit_reached, platform_daily_limit_reached), far above every plan's limits. A project's test keys have windows of their own, apart from live mail: 3,000 recipients a minute and 100,000 a UTC day, suppressed ones included, with the same two codes and Retry-After. A message is at most 10 MB (413 message_too_large) and its size times its recipients at most 25 MB (413 message_too_large_for_recipients); a request body over 21 MB is not read (413 payload_too_large). While the platform's storage is low it takes no new messages (503 service_degraded, with Retry-After). cc and bcc take only exactly one to (422 cc_bcc_require_single_to); bcc recipients appear in no header. headers adds up to 10 of your own (List-Unsubscribe, List-Unsubscribe-Post, In-Reply-To, References, X-); any other, or one that breaks a rule, answers 400 under errors.headers. sendAt schedules the message: an ISO 8601 time with Z or an offset, at least a minute and at most 30 days ahead (422 send_at_too_soon, send_at_too_far; without an offset 400 under errors.sendAt). It waits with status scheduled and goes out at that time; the limits count then, not now. A project holds at most 10,000 scheduled messages of 256 MB together (409 scheduled_limit_reached, scheduled_size_limit_reached). Cancel one with DELETE /v1/emails/{id}.

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringno1 to 256 characters. A repeat within 24 hours answers as the first request did, without sending again.

Request body

SendEmailRequest

FieldTypeRequiredDescription
fromstringyesAn address on a verified domain of the key's project, optionally with a display name (without ',', '@' or a character that looks like '@', such as the fullwidth U+FF20).
toarray of stringyes1 to 50 bare addresses, without display names; each gets a message of its own.
subjectstringyesAt most 998 characters, without control characters.
textstringnoThe plain-text body; text, html or both.
htmlstringnoThe HTML body; text, html or both.
tagstringnoOptional; at most 64 letters, digits, '-' or '_'.
replyTostringnoOptional; one address, with or without a display name.
attachmentsarray of EmailAttachmentnoOptional; one with a contentId is inline, for cid: references in the HTML. The message, attachments included, is at most 10 MB, and its size times its recipients at most 25 MB (413).
ccarray of stringnoOptional; bare addresses, only with exactly one to (422 cc_bcc_require_single_to). Every copy shows them in its Cc header, and each gets a message of its own.
bccarray of stringnoOptional; bare addresses, only with exactly one to. Never in any header; each gets a message of its own. to, cc and bcc together hold at most 50 addresses, each once.
headersmap of stringnoOptional; at most 10 extra headers: List-Unsubscribe, List-Unsubscribe-Post, In-Reply-To, References and X- headers. Values are printable ASCII, at most 900 characters; headers Postilio sets itself cannot be set (see Custom headers in the docs).
sendAtstring (date-time)noOptional; when to send it, ISO 8601 with Z or an offset, such as 2026-11-02T09:00:00+01:00; without one it names no instant and is refused (400, under errors.sendAt). At least a minute and at most 30 days ahead (422 send_at_too_soon, send_at_too_far). Until then the message is scheduled and can be canceled with DELETE /v1/emails/{id}. Not over SMTP.

Responses

StatusMeaningBody
202AcceptedSendEmailResponse
400Bad RequestHttpValidationProblemDetails
422Unprocessable EntityErrorResponse
409ConflictErrorResponse
429Too Many RequestsErrorResponse
413Payload Too LargeErrorResponse
503Service UnavailableErrorResponse

Send a test email

POST /v1/emails/test

Needs the emails:send scope. Sends one test email from a verified domain to one address of your own: an address a member confirmed for test emails in the project's portal (Test mail), or a member's address; any other is refused (422 test_recipient_not_confirmed). Without subject, text and html it sends Postilio's sample message. A project sends a few test emails per UTC day (429 test_mail_daily_limit_reached, with Retry-After). Otherwise it is a send like POST /v1/emails: the same limits, sandbox and sizes apply and it counts towards your usage. The message is listed with via test_mail; follow it with GET /v1/emails/{id}.

Request body

TestEmailRequest

FieldTypeRequiredDescription
fromstringyesAn address on a verified domain of the project.
tostringyesOne address: confirmed for test mail in the project, or a member's of its organization.
subjectstringnoWith text or html, your own message; without all three, Postilio's sample message.
textstringno
htmlstringno

Responses

StatusMeaningBody
202AcceptedTestEmailResponse
400Bad RequestHttpValidationProblemDetails
422Unprocessable EntityErrorResponse
409ConflictErrorResponse
429Too Many RequestsErrorResponse
413Payload Too LargeErrorResponse
503Service UnavailableErrorResponse

Summarize delivery problems

GET /v1/emails/problems

Needs the emails:read scope. The messages of the last 24 hours (24h, the default) or 7 days (7d) that are deferred, bounced, complained or expired now, counted per status and reason, with the count per sender domain and the ids of up to 5 of the newest. It never lists a recipient: look one up with GET /v1/emails/{id}. domain counts only that sender domain. A test key counts only test messages and a live key only live ones.

Parameters

NameInTypeRequiredDescription
periodquerystringno24h (the default) or 7d.
domainquerystringnoOnly the messages from this sender domain.

Responses

StatusMeaningBody
200OKEmailProblems
400Bad RequestHttpValidationProblemDetails

Get an email and its events

GET /v1/emails/{id}

Needs the emails:read scope. A test key finds only test messages and a live key only live ones; the other mode's are 404. A scheduled message shows its sendAt.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKEmailDetails
404Not Found—

Cancel a scheduled email

DELETE /v1/emails/{id}

Needs the emails:send scope. Cancels a message sent with sendAt while it waits: it gets status canceled and a canceled event, and its content is deleted. Once it is on its way, or for a message that was never scheduled, the answer is 409 email_not_scheduled. A test key finds only test messages and a live key only live ones; the other mode's are 404.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
204No Content—
404Not Found—
409ConflictErrorResponse

Domains

Add a sending domain

POST /v1/domains

Needs the domains:manage scope. Answers the domain as pending, with the two CNAME records to create in its DNS. postilio.eu and names under it cannot be added. 409 domain_exists when the project has it already, 409 domain_limit_reached when the organization's plan allows no more domains.

Request body

CreateDomainRequest

FieldTypeRequiredDescription
namestringyesA host name of at least two labels, such as mail.example.com; not an IP address, not under postilio.eu or pstlmta.net.

Responses

StatusMeaningBody
201CreatedDomainResponse
400Bad RequestHttpValidationProblemDetails
409ConflictErrorResponse

List sending domains

GET /v1/domains

Needs the domains:read or domains:manage scope.

Responses

StatusMeaningBody
200OKDomainList

Get a sending domain

GET /v1/domains/{id}

Needs the domains:read or domains:manage scope.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKDomainResponse
404Not Found—

Remove a sending domain

DELETE /v1/domains/{id}

Needs the domains:manage scope. Mail from the domain stops at once.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
204No Content—
404Not Found—

Check a domain's DNS records now

POST /v1/domains/{id}/check

Needs the domains:manage scope. Checks now instead of at the next periodic check (every 10 minutes) and answers the domain's new state. Once a minute per domain: 429 too_many_checks with Retry-After. 503 dns_unavailable when DNS gave no answer.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKDomainResponse
404Not Found—
429Too Many RequestsErrorResponse
503Service UnavailableErrorResponse

Suppressions

List suppressed addresses

GET /v1/suppressions

Needs the suppressions:read or suppressions:manage scope. Newest first; pass next as before for the next page. address checks one address: the list then holds its entry, or nothing when it isn't suppressed.

Parameters

NameInTypeRequiredDescription
qquerystringnoPart of an address.
reasonquerystringnohard_bounce, complaint or manual.
beforequerystring (uuid)noThe next of the previous page.
limitqueryinteger (int32)no1 to 100; 50 when left out.
addressquerystringnoOne whole address, in any case.

Responses

StatusMeaningBody
200OKSuppressionList
400Bad RequestHttpValidationProblemDetails

Suppress an address

POST /v1/suppressions

Needs the suppressions:manage scope. Adds the address with reason manual. 409 address_already_suppressed when it is on the list already.

Request body

CreateSuppressionRequest

FieldTypeRequiredDescription
addressstringyesOne bare address, at most 254 characters.

Responses

StatusMeaningBody
201CreatedSuppressionResponse
400Bad RequestHttpValidationProblemDetails
409ConflictErrorResponse

Remove a suppressed address

DELETE /v1/suppressions/{id}

Needs the suppressions:manage scope. A complaint is removed only with a reason, {"reason": "…"} of 10 to 500 characters; without one the answer is 422 reason_required. A hard bounce or manual entry needs no body.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Request body (optional)

RemoveSuppressionRequest

FieldTypeRequiredDescription
reasonstringnoRequired, at least 10 characters, when the entry is a complaint; kept with the removal.

Responses

StatusMeaningBody
204No Content—
404Not Found—
422Unprocessable EntityErrorResponse
400Bad RequestHttpValidationProblemDetails

Webhooks

List webhook endpoints

GET /v1/webhooks

Needs the webhooks:read or webhooks:manage scope.

Responses

StatusMeaningBody
200OKWebhookEndpointList

Add a webhook endpoint

POST /v1/webhooks

Needs the webhooks:manage scope. The answer holds the signing secret, the only time it is shown. At most 10 endpoints per project, and as many for the organization as its plan allows: 409 webhook_endpoint_limit_reached.

Request body

CreateWebhookEndpointRequest

FieldTypeRequiredDescription
urlstringyesAn absolute https:// URL on a public address, at most 2048 characters, without credentials or a fragment.
eventsarray of stringyesOne or more of: accepted, queued, delivered, deferred, bounced, expired, complained, suppressed, scheduled, canceled, and inbound (received inbound mail).
descriptionstringnoOptional; at most 200 characters.
modestringnolive (the default) or test.

Responses

StatusMeaningBody
201CreatedCreatedWebhookEndpoint
400Bad RequestHttpValidationProblemDetails
409ConflictErrorResponse

Get a webhook endpoint

GET /v1/webhooks/{id}

Needs the webhooks:read or webhooks:manage scope.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKWebhookEndpointResponse
404Not Found—

Change a webhook endpoint

PATCH /v1/webhooks/{id}

Needs the webhooks:manage scope. Only the fields you send change. paused: false resumes a paused endpoint.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Request body

UpdateWebhookEndpointRequest

FieldTypeRequiredDescription
urlstringno
eventsarray of stringno
descriptionstringnoAn empty string removes it.
pausedbooleannotrue pauses the endpoint, false resumes it.

Responses

StatusMeaningBody
200OKWebhookEndpointResponse
400Bad RequestHttpValidationProblemDetails
404Not Found—

Remove a webhook endpoint

DELETE /v1/webhooks/{id}

Needs the webhooks:manage scope.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
204No Content—
404Not Found—

Rotate the signing secret

POST /v1/webhooks/{id}/secret

Needs the webhooks:manage scope. Answers the new secret once. The old one keeps signing as well for 24 hours.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKRotatedWebhookSecret
404Not Found—

Send a test event

POST /v1/webhooks/{id}/test

Needs the webhooks:manage scope. One webhook.test.v1 delivery, tried once without retries, also to a paused endpoint.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
202AcceptedWebhookDeliveryResponse
404Not Found—

List an endpoint's deliveries

GET /v1/webhooks/{id}/deliveries

Needs the webhooks:read or webhooks:manage scope. Newest first; pass next as before for the next page.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
statusquerystringnopending, delivered or failed.
beforequerystring (uuid)noThe next of the previous page.
limitqueryinteger (int32)no1 to 100; 50 when left out.

Responses

StatusMeaningBody
200OKWebhookDeliveryList
400Bad RequestHttpValidationProblemDetails
404Not Found—

Retry a delivery

POST /v1/webhooks/{id}/deliveries/{deliveryId}/retry

Needs the webhooks:manage scope. One more attempt now, with the same id and payload. 409 delivery_still_pending while it is still being retried, endpoint_paused while the endpoint is paused.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
deliveryIdpathstring (uuid)yes

Responses

StatusMeaningBody
202Accepted—
404Not Found—
409ConflictErrorResponse

Inbound

List receiving domains

GET /v1/inbound/domains

Needs the inbound:read or inbound:manage scope.

Responses

StatusMeaningBody
200OKInboundDomainList

Add a receiving domain

POST /v1/inbound/domains

Needs the inbound:manage scope. 409 inbound_domain_has_mx when the name has MX records of another party (send confirmExistingMx), inbound_domain_exists, inbound_domain_taken or inbound_domain_limit_reached; 422 inbound_domain_reserved.

Request body

CreateInboundDomainRequest

FieldTypeRequiredDescription
namestringyesA host name of at least two labels; a subdomain that receives no mail today is best.
confirmExistingMxbooleannoGo ahead although the name has MX records of another party: mail to it stops arriving there once its MX points at Postilio.

Responses

StatusMeaningBody
201CreatedInboundDomainResponse
400Bad RequestHttpValidationProblemDetails
409ConflictErrorResponse
422Unprocessable EntityErrorResponse

Get a receiving domain

GET /v1/inbound/domains/{id}

Needs the inbound:read or inbound:manage scope.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKInboundDomainResponse
404Not Found—

Remove a receiving domain

DELETE /v1/inbound/domains/{id}

Needs the inbound:manage scope. Mail to it is refused from then on.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
204No Content—
404Not Found—

Check a receiving domain's DNS now

POST /v1/inbound/domains/{id}/check

Needs the inbound:manage scope. At most once a minute per domain: 429 too_many_checks with Retry-After; 503 dns_unavailable.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKInboundDomainResponse
404Not Found—
429Too Many RequestsErrorResponse
503Service UnavailableErrorResponse

List inbound routes

GET /v1/inbound/routes

Needs the inbound:read or inbound:manage scope.

Responses

StatusMeaningBody
200OKInboundRouteList

Add an inbound route

POST /v1/inbound/routes

Needs the inbound:manage scope. A webhook route turns the inbound event on at its endpoint. 409 inbound_route_exists or inbound_route_limit_reached (at most 100 per project); 422 inbound_domain_not_found, webhook_endpoint_not_found or webhook_endpoint_mode_mismatch.

Request body

CreateInboundRouteRequest

FieldTypeRequiredDescription
domainIdstring (uuid)yesA receiving domain of the project.
matchstringyesexact, prefix or catch_all.
valuestringyesThe local part (exact) or its start (prefix), at most 64 characters; empty for catch_all. Stored lower case.
actionstringyeswebhook or store.
endpointIdstring (uuid)noFor a webhook route: an endpoint of the project in the route's mode. The route turns its inbound event on.
spamActionstringnofilter_reject (the default) or deliver_all.
senderAllowarray of stringnoAddresses or @domain, at most 100; empty or left out takes everyone.
requireDmarcbooleanno
modestringnolive (the default) or test.
descriptionstringnoAt most 200 characters.

Responses

StatusMeaningBody
201CreatedInboundRouteResponse
400Bad RequestHttpValidationProblemDetails
409ConflictErrorResponse
422Unprocessable EntityErrorResponse

Get an inbound route

GET /v1/inbound/routes/{id}

Needs the inbound:read or inbound:manage scope.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKInboundRouteResponse
404Not Found—

Change an inbound route

PATCH /v1/inbound/routes/{id}

Needs the inbound:manage scope. Only the fields you send change. paused: true asks senders to try again later (450). 422 webhook_endpoint_not_found or webhook_endpoint_mode_mismatch.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Request body

UpdateInboundRouteRequest

FieldTypeRequiredDescription
actionstringnowebhook or store; store clears the endpoint.
endpointIdstring (uuid)noThe endpoint of a webhook route.
spamActionstringno
senderAllowarray of stringno
requireDmarcbooleanno
pausedbooleannotrue pauses the route, false resumes it.
descriptionstringno

Responses

StatusMeaningBody
200OKInboundRouteResponse
400Bad RequestHttpValidationProblemDetails
404Not Found—
422Unprocessable EntityErrorResponse

Remove an inbound route

DELETE /v1/inbound/routes/{id}

Needs the inbound:manage scope. Its addresses are refused from then on.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
204No Content—
404Not Found—

List received messages

GET /v1/inbound/messages

Needs the inbound:read or inbound:manage scope. Newest first, metadata only; pass next as before for the next page. A key sees the messages of its mode.

Parameters

NameInTypeRequiredDescription
statusquerystringnoreceived, delivering, delivered, failed, stored, filtered or expired.
routequerystring (uuid)noOnly the messages of this route.
beforequerystring (uuid)noThe next of the previous page: the older page after it.
limitqueryinteger (int32)no1 to 100; 50 when left out.

Responses

StatusMeaningBody
200OKInboundMessageList
400Bad RequestHttpValidationProblemDetails

Get a received message

GET /v1/inbound/messages/{id}

Needs the inbound:read or inbound:manage scope. With content, the data of its inbound.received.v1 event, while the content is kept; then contentDeleted.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKInboundMessageDetail
404Not Found—

Download an attachment

GET /v1/inbound/messages/{id}/attachments/{index}

Needs the inbound:read or inbound:manage scope. Always as a download, never sniffed. 410 inbound_content_deleted once the content went.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
indexpathinteger (int32)yes

Responses

StatusMeaningBody
200OKstring (byte)
410GoneErrorResponse

Download the raw message

GET /v1/inbound/messages/{id}/raw

Needs the inbound:read or inbound:manage scope. The message as it arrived, message/rfc822. 410 inbound_content_deleted once the content went.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
200OKstring (byte)
410GoneErrorResponse

Redeliver a received message

POST /v1/inbound/messages/{id}/redeliver

Needs the inbound:manage scope. One more attempt now to the endpoint of its route, with the same id and body. 409 delivery_still_pending, endpoint_paused, inbound_route_has_no_endpoint or inbound_still_processing; 410 inbound_content_deleted.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
202Accepted—
404Not Found—

Delete a received message's content

DELETE /v1/inbound/messages/{id}/content

Needs the inbound:manage scope. Now, instead of when it expires; the metadata stays. Also 204 when it went already.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

StatusMeaningBody
204No Content—
404Not Found—

Schemas

ApiKeyMonthUsage

The calling key in the month: its messages by the UTC day they were accepted and their status now, so a late bounce counts in the month the message was accepted in. Informative; the project's numbers are what is billed.

FieldTypeRequiredDescription
idstring (uuid)yesThe key making the call.
acceptedinteger (int64)yesMessages the key had accepted, one per recipient.
sentinteger (int64)yesAccepted minus suppressed.
suppressedinteger (int64)yesAccepted but never sent, because the address is suppressed.
deliveredinteger (int64)yesDelivered now; one with a complaint after delivery counts as complained instead.
bouncedinteger (int64)yes
complainedinteger (int64)yes

ApiProjectUsage

FieldTypeRequiredDescription
idstring (uuid)yes
billableinteger (int64)yesAccepted minus suppressed: what is billed.
acceptedinteger (int64)yes
suppressedinteger (int64)yes
deliveredinteger (int64)yes
bouncedinteger (int64)yes
complainedinteger (int64)yes
receivedinteger (int64) or nullnoInbound mail the project received, which counts in the monthly volume like a sent message; null when its organization does not receive mail.

ApiUsage

The key's project in one UTC month, and where its organization stands; never the organization's own numbers.

FieldTypeRequiredDescription
monthstringyesyyyy-MM.
finalbooleanyesThe month is closed: these numbers no longer change.
resetsAtstring (date-time)yesThe start of the next month, 00:00 UTC.
organizationApiUsageOrganizationyes
projectApiProjectUsageyes
apiKeyApiKeyMonthUsageyes

ApiUsageOrganization

FieldTypeRequiredDescription
planstring or nullyesThe code of the plan the organization has now.
statestring or nullyesAs in the portal: ok, warning, over or capped for the current month, null for another one.

CreateDomainRequest

FieldTypeRequiredDescription
namestringyesA host name of at least two labels, such as mail.example.com; not an IP address, not under postilio.eu or pstlmta.net.

CreatedWebhookEndpoint

FieldTypeRequiredDescription
endpointWebhookEndpointResponseyes
secretstringyesThe signing secret (whsec_…). Shown once: it is stored encrypted and never returned again.

CreateInboundDomainRequest

FieldTypeRequiredDescription
namestringyesA host name of at least two labels; a subdomain that receives no mail today is best.
confirmExistingMxbooleannoGo ahead although the name has MX records of another party: mail to it stops arriving there once its MX points at Postilio.

CreateInboundRouteRequest

FieldTypeRequiredDescription
domainIdstring (uuid)yesA receiving domain of the project.
matchstringyesexact, prefix or catch_all.
valuestringyesThe local part (exact) or its start (prefix), at most 64 characters; empty for catch_all. Stored lower case.
actionstringyeswebhook or store.
endpointIdstring (uuid)noFor a webhook route: an endpoint of the project in the route's mode. The route turns its inbound event on.
spamActionstringnofilter_reject (the default) or deliver_all.
senderAllowarray of stringnoAddresses or @domain, at most 100; empty or left out takes everyone.
requireDmarcbooleanno
modestringnolive (the default) or test.
descriptionstringnoAt most 200 characters.

CreateSuppressionRequest

FieldTypeRequiredDescription
addressstringyesOne bare address, at most 254 characters.

CreateWebhookEndpointRequest

FieldTypeRequiredDescription
urlstringyesAn absolute https:// URL on a public address, at most 2048 characters, without credentials or a fragment.
eventsarray of stringyesOne or more of: accepted, queued, delivered, deferred, bounced, expired, complained, suppressed, scheduled, canceled, and inbound (received inbound mail).
descriptionstringnoOptional; at most 200 characters.
modestringnolive (the default) or test.

DmarcCheck

FieldTypeRequiredDescription
statusstringyesmissing (no record), invalid (receivers ignore it), monitoring (the policy that applies is none: reports only) or enforced (quarantine or reject applies).
policyDomainstring or nullyesWhere the record was found: the domain itself or, for a subdomain without its own, its Organizational Domain (or public suffix domain) as receivers find it; null while missing.
recordsarray of stringyesThe DMARC records found there, as published.
issuesarray of stringyesWhy it is invalid: multiple_records, version (does not start with v=DMARC1) or syntax. Advice on a record receivers use: no_reports (the policy is none and there is no rua=, so nobody sees the reports), spf_strict (aspf=s: SPF cannot align with the return path on bounce.<domain>, so DMARC rests on DKIM alone), obsolete_tag (pct=, rf= or ri=, which receivers no longer read; t=y replaces pct=) or invalid_policy (p=, sp= or np= has a value receivers do not accept; they act as if it were p=none because rua= is valid).
policystring or nullyesThe policy receivers apply to failing mail: none, quarantine or reject, after t=y lowered it one step; null while missing or invalid.
testingbooleanyesTrue when the record has t=y: the owner is testing the policy, so receivers apply one step less.

DnsRecord

FieldTypeRequiredDescription
typestringyes
namestringyes
valuestringyes
statusstringyesfound, missing, or unknown until the first check.
newValuestring or nullnoOnly on a record that points at one of Postilio's older names: today's name for it. The old value keeps working; pointing the record here instead moves it (Migrate your domain). Absent otherwise.
newNamestring or nullnoOnly next to newValue, when the record moves to a new name too (an older domain's dated DKIM selector to pst1, bounce to pst-bounces): the name to create with newValue. The old record keeps working until the new one is found.

DomainCount

Messages of one sender domain.

FieldTypeRequiredDescription
domainstringyes
messagesinteger (int64)yes

DomainList

A list in an object, so paging can be added without breaking clients.

FieldTypeRequiredDescription
dataarray of DomainResponseyes

DomainResponse

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyes
statusstringyespending, partially_verified, verified or failing. partially_verified: it sends as verified, but the DKIM record of its second selector (pst1/pst2) is not found yet.
checkedAtstring (date-time) or nullyes
recordsarray of DnsRecordyes
createdAtstring (date-time)yes
addedBystring or nullyesThe name of the dashboard user who added it; null when it was added with an API key.
failingSincestring (date-time) or nullyesSince when its records are missing, while it is failing.
sent30dinteger (int32)yesLive messages sent from it today and the 29 days before (UTC); test and suppressed ones not.
dmarcanyyes
platformKeyanyyes
newRecordsarray of DnsRecord or nullnoOnly while Postilio offers this domain the move to its new record names (Migrate your domain): records the move adds, which do not exist yet (the second DKIM selector, pst2). Not needed to send; absent otherwise.

EmailAttachment

FieldTypeRequiredDescription
fileNamestringyes
contentTypestringyesA MIME type such as application/pdf, optionally with parameters.
contentstringyesThe file, base64-encoded.
contentIdstringnoMakes the attachment inline; the HTML refers to it as cid: plus this value.

EmailDetails

FieldTypeRequiredDescription
idstring (uuid)yes
statusstringyes
fromstringyes
tostringyes
subjectstring or nullyes
tagstring or nullyes
acceptedAtstring (date-time)yes
testbooleanyes
eventsarray of EmailEventyes
viastringyesapi, smtp, or test_mail for a test email: how the message was submitted.
sendAtstring (date-time) or nullnoWhen it is scheduled to go out (sendAt of the request); null when it was sent at once.

EmailEvent

FieldTypeRequiredDescription
typestringyes
occurredAtstring (date-time)yes
smtpCodeinteger (int16) or nullyesThe receiving server's reply code; null when no server replied, such as when no connection could be made.
responsestring or nullyesThe receiving server's reply, with addresses and IP addresses masked; when no server replied, a sentence that explains what happened.
attemptinteger (int16) or nullno
remoteHoststring or nullno
enhancedCodestring or nullno
classificationstring or nullno
reasonstring or nullnoWhy the attempt was delayed or failed, as a stable code (see Delivery status in the docs), such as tls_certificate_invalid, mailbox_full or recipient_server_temporary; null when there is nothing to explain.
asyncboolean or nullnoTrue for a report that arrived after delivery: a bounce the recipient's mail server sent later (reason async_bounce), or a complaint a mailbox provider's feedback loop reported (reason feedback_loop); null otherwise.

EmailProblemGroup

The messages with one problem: their status and why, never an address.

FieldTypeRequiredDescription
statusstringyesdeferred, bounced, complained or expired, now.
reasonstring or nullyesThe stable code of the event that set the status (see Delivery status in the docs); null when it has none, as a complaint.
messagesinteger (int64)yesHow many messages have this status and reason.
byDomainarray of DomainCountyesPer sender domain, most messages first.
examplesarray of string (uuid)yesThe ids of up to 5 of the newest, to look up with GET /v1/emails/{id}.

EmailProblems

FieldTypeRequiredDescription
periodstringyes24h or 7d.
fromstring (date-time)yesThe start of the period: the first hour (24h) or day (7d) counted, UTC.
tostring (date-time)yesNow: the end of the period.
domainstring or nullyesThe sender domain these are of; null for every domain.
dataarray of EmailProblemGroupyesMost messages first.

ErrorResponse

FieldTypeRequiredDescription
errorstringyesA stable code, such as message_too_large.
messagestring or nullnoOnly with some codes: a sentence for people, such as the limit that was crossed.

HttpValidationProblemDetails

FieldTypeRequiredDescription
typestring or nullno
titlestring or nullno
statusinteger (int32) or nullno
detailstring or nullno
instancestring or nullno
errorsmap of array of stringno

InboundDomainList

FieldTypeRequiredDescription
dataarray of InboundDomainResponseyes

InboundDomainResponse

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyes
statusstringyespending, active, failing or suspended.
checkedAtstring (date-time) or nullyes
sendingDomainstring or nullyesThe verified sending domain of the project that proves it; null for a domain proven with a TXT token.
recordsarray of DnsRecordyesWhat the customer adds at their DNS provider: the TXT token when it needs one, and the MX record.
mxFoundarray of stringyesThe MX records at the last check, as "10 host".
warningsarray of stringyesmx_shared_priority, mx_lower_priority_elsewhere, null_mx, mx_is_cname, name_taken.
createdAtstring (date-time)yes
failingSincestring (date-time) or nullyes
suspendedSincestring (date-time) or nullyes

InboundMessageDetail

A received message with its content while it is kept.

FieldTypeRequiredDescription
contentanyyes
idstring (uuid)no
routeIdstring (uuid) or nullnoThe route it came in by; null once that route was deleted.
domainIdstring (uuid)noThe receiving domain it was addressed to.
testbooleanno
receivedAtstring (date-time)no
statusstringnoreceived, delivering, delivered, failed, stored, filtered or expired.
filteredReasonstring or nullnoWhy it was held back (filtered): sender_not_allowed, dmarc_failed or spam.
expiredReasonstring or nullnoWhy it expired: content_expired or lost_in_restore.
mailFromstringnoThe envelope sender, lower case; empty for a bounce.
recipientsarray of stringnoThe envelope recipients on this receiving domain.
fromstring or nullnoThe address of the From header.
subjectstring or nullnoOnly when the project keeps subjects.
messageIdstring or nullnoThe Message-ID header.
inReplyTostring or nullnoThe In-Reply-To header.
relatedEmailIdstring (uuid) or nullnoThe email this project sent that it replies to.
sizeBytesinteger (int32)no
attachmentCountinteger (int32) or nullno
spamScorenumber (double) or nullno
spamVerdictstring or nullnoclean, suspect, spam or unscored.
dmarcstring or nullnoThe DMARC result of the From domain: pass, fail, none and so on.
parseErrorstring or nullnoWhy it could not be read within the limits, as in the event.
deliveredAtstring (date-time) or nullno
contentExpiresAtstring (date-time)noWhen its content goes at the latest.
contentDeletedbooleannoIts content went: only this metadata is left.

InboundMessageList

FieldTypeRequiredDescription
dataarray of InboundMessageResponseyes
nextstring (uuid) or nullyesPass as before for the next, older page; null on the last.

InboundMessageResponse

A received message without its content: what a list shows.

FieldTypeRequiredDescription
idstring (uuid)yes
routeIdstring (uuid) or nullyesThe route it came in by; null once that route was deleted.
domainIdstring (uuid)yesThe receiving domain it was addressed to.
testbooleanyes
receivedAtstring (date-time)yes
statusstringyesreceived, delivering, delivered, failed, stored, filtered or expired.
filteredReasonstring or nullyesWhy it was held back (filtered): sender_not_allowed, dmarc_failed or spam.
expiredReasonstring or nullyesWhy it expired: content_expired or lost_in_restore.
mailFromstringyesThe envelope sender, lower case; empty for a bounce.
recipientsarray of stringyesThe envelope recipients on this receiving domain.
fromstring or nullyesThe address of the From header.
subjectstring or nullyesOnly when the project keeps subjects.
messageIdstring or nullyesThe Message-ID header.
inReplyTostring or nullyesThe In-Reply-To header.
relatedEmailIdstring (uuid) or nullyesThe email this project sent that it replies to.
sizeBytesinteger (int32)yes
attachmentCountinteger (int32) or nullyes
spamScorenumber (double) or nullyes
spamVerdictstring or nullyesclean, suspect, spam or unscored.
dmarcstring or nullyesThe DMARC result of the From domain: pass, fail, none and so on.
parseErrorstring or nullyesWhy it could not be read within the limits, as in the event.
deliveredAtstring (date-time) or nullyes
contentExpiresAtstring (date-time)yesWhen its content goes at the latest.
contentDeletedbooleanyesIts content went: only this metadata is left.

InboundRouteList

FieldTypeRequiredDescription
dataarray of InboundRouteResponseyes

InboundRouteResponse

FieldTypeRequiredDescription
idstring (uuid)yes
domainIdstring (uuid)yesThe receiving domain whose addresses it takes.
domainstringyes
modestringyeslive or test: a test route delivers to a test endpoint.
matchstringyesexact, prefix or catch_all.
valuestringyesThe local part (exact) or its start (prefix), lower case; empty for a catch-all.
actionstringyeswebhook (to EndpointId) or store (for the API only).
endpointIdstring (uuid) or nullyesThe endpoint of a webhook route; null for a store route, or once the endpoint was deleted.
spamActionstringyesfilter_reject (hold back what rspamd would reject) or deliver_all.
senderAllowarray of stringyesOnly mail from these senders (addresses or @domain, on the From header) is taken; empty takes everyone.
requireDmarcbooleanyesOnly mail that passes DMARC is taken.
pausedbooleanyesA paused route asks senders to try again later (450).
descriptionstring or nullyes
createdAtstring (date-time)yes

JsonElement

any

PlatformKeyRecord

FieldTypeRequiredDescription
typestringyes
namestringyes
statusstringyespublished (found in DNS at the last check), publishing (Postilio is publishing it, or it is not checked yet), failed (publishing it keeps failing; Postilio is on it) or manual (this installation publishes it by hand).

RemoveSuppressionRequest

FieldTypeRequiredDescription
reasonstringnoRequired, at least 10 characters, when the entry is a complaint; kept with the removal.

RotatedWebhookSecret

FieldTypeRequiredDescription
secretstringyesThe new signing secret, shown once.
previousSecretExpiresAtstring (date-time)yesUntil then deliveries are signed with the old secret as well.

SendEmailRequest

FieldTypeRequiredDescription
fromstringyesAn address on a verified domain of the key's project, optionally with a display name (without ',', '@' or a character that looks like '@', such as the fullwidth U+FF20).
toarray of stringyes1 to 50 bare addresses, without display names; each gets a message of its own.
subjectstringyesAt most 998 characters, without control characters.
textstringnoThe plain-text body; text, html or both.
htmlstringnoThe HTML body; text, html or both.
tagstringnoOptional; at most 64 letters, digits, '-' or '_'.
replyTostringnoOptional; one address, with or without a display name.
attachmentsarray of EmailAttachmentnoOptional; one with a contentId is inline, for cid: references in the HTML. The message, attachments included, is at most 10 MB, and its size times its recipients at most 25 MB (413).
ccarray of stringnoOptional; bare addresses, only with exactly one to (422 cc_bcc_require_single_to). Every copy shows them in its Cc header, and each gets a message of its own.
bccarray of stringnoOptional; bare addresses, only with exactly one to. Never in any header; each gets a message of its own. to, cc and bcc together hold at most 50 addresses, each once.
headersmap of stringnoOptional; at most 10 extra headers: List-Unsubscribe, List-Unsubscribe-Post, In-Reply-To, References and X- headers. Values are printable ASCII, at most 900 characters; headers Postilio sets itself cannot be set (see Custom headers in the docs).
sendAtstring (date-time)noOptional; when to send it, ISO 8601 with Z or an offset, such as 2026-11-02T09:00:00+01:00; without one it names no instant and is refused (400, under errors.sendAt). At least a minute and at most 30 days ahead (422 send_at_too_soon, send_at_too_far). Until then the message is scheduled and can be canceled with DELETE /v1/emails/{id}. Not over SMTP.

SendEmailResponse

FieldTypeRequiredDescription
idsarray of string (uuid)yesOne message per recipient, in the order of to, then cc, then bcc.
suppressedarray of stringyesRecipients on the project's suppression list: accepted with status suppressed, not sent.

SuppressionList

FieldTypeRequiredDescription
dataarray of SuppressionResponseyes
nextstring (uuid) or nullyesPass as before for the next page; null on the last page.

SuppressionResponse

FieldTypeRequiredDescription
idstring (uuid)yes
addressstringyes
reasonstringyeshard_bounce, complaint or manual.
detailstring or nullyesThe remote server's answer for a bounce, or who added it.
sourceMessageIdstring (uuid) or nullyesThe message that caused it; it may already be gone from the log.
createdAtstring (date-time)yes

TestEmailRequest

FieldTypeRequiredDescription
fromstringyesAn address on a verified domain of the project.
tostringyesOne address: confirmed for test mail in the project, or a member's of its organization.
subjectstringnoWith text or html, your own message; without all three, Postilio's sample message.
textstringno
htmlstringno

TestEmailResponse

FieldTypeRequiredDescription
idstring (uuid)yes

UpdateInboundRouteRequest

Only the fields sent change; the domain, match, value and mode stay.

FieldTypeRequiredDescription
actionstringnowebhook or store; store clears the endpoint.
endpointIdstring (uuid)noThe endpoint of a webhook route.
spamActionstringno
senderAllowarray of stringno
requireDmarcbooleanno
pausedbooleannotrue pauses the route, false resumes it.
descriptionstringno

UpdateWebhookEndpointRequest

Every field is optional; what is left out stays as it is.

FieldTypeRequiredDescription
urlstringno
eventsarray of stringno
descriptionstringnoAn empty string removes it.
pausedbooleannotrue pauses the endpoint, false resumes it.

WebhookDeliveryList

FieldTypeRequiredDescription
dataarray of WebhookDeliveryResponseyes
nextstring (uuid) or nullyesPass as before for the next page; null on the last page.

WebhookDeliveryResponse

FieldTypeRequiredDescription
idstring (uuid)yes
eventIdstring (uuid)yesThe webhook-id header: the same for every attempt.
typestringyesThe payload type, e.g. email.delivered.v1, or inbound.received.v1.
emailIdstring (uuid) or nullyes
tostring or nullyes
statusstringyespending, delivered or failed.
attemptsinteger (int32)yes
lastAttemptAtstring (date-time) or nullyes
lastStatusCodeinteger (int32) or nullyes
lastErrorstring or nullyes
lastDurationMsinteger (int32) or nullyes
responseSnippetstring or nullyesThe start of the last response body, at most 256 characters.
nextAttemptAtstring (date-time) or nullyesSet while pending.
createdAtstring (date-time)yes

WebhookEndpointList

FieldTypeRequiredDescription
dataarray of WebhookEndpointResponseyes

WebhookEndpointResponse

FieldTypeRequiredDescription
idstring (uuid)yes
urlstringyes
descriptionstring or nullyes
eventsarray of stringyesThe message events it gets: accepted, queued, delivered, deferred, bounced, expired, complained, suppressed, scheduled, canceled, and inbound (received inbound mail).
modestringyeslive, or test: a test endpoint gets the events of test-key messages only.
pausedbooleanyes
pauseReasonstring or nullyes
pausedAtstring (date-time) or nullyes
failingSincestring (date-time) or nullyesEvery attempt since then failed; after 72 hours of that the endpoint is paused.
secretHintstringyesThe last characters of the signing secret.
previousSecretExpiresAtstring (date-time) or nullyesUntil then the secret from before the last rotation still signs as well.
createdAtstring (date-time)yes
lastDeliveryanyyes

WebhookLastDelivery

FieldTypeRequiredDescription
atstring (date-time)yesWhen the attempt was made.
statusCodeinteger (int32) or nullyesThe receiver's HTTP status; null when no answer came (timeout, refused, blocked address).
statusstringyesThe delivery's status now: pending (to be retried), delivered or failed.