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
Name
In
Type
Required
Description
month
query
string
no
yyyy-MM, a UTC month; the current month when left out.
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
Name
In
Type
Required
Description
Idempotency-Key
header
string
no
1 to 256 characters. A repeat within 24 hours answers as the first request did, without sending again.
An 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).
to
array of string
yes
1 to 50 bare addresses, without display names; each gets a message of its own.
subject
string
yes
At most 998 characters, without control characters.
text
string
no
The plain-text body; text, html or both.
html
string
no
The HTML body; text, html or both.
tag
string
no
Optional; at most 64 letters, digits, '-' or '_'.
replyTo
string
no
Optional; one address, with or without a display name.
Optional; 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).
cc
array of string
no
Optional; 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.
bcc
array of string
no
Optional; 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.
headers
map of string
no
Optional; 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).
sendAt
string (date-time)
no
Optional; 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.
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 viatest_mail; follow it with GET /v1/emails/{id}.
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.
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.
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.
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.
Needs the domains:manage scope. Mail from the domain stops at once.
Parameters
Name
In
Type
Required
Description
id
path
string (uuid)
yes
Responses
Status
Meaning
Body
204
No Content
—
404
Not 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.
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.
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.
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.
An absolute https:// URL on a public address, at most 2048 characters, without credentials or a fragment.
events
array of string
yes
One or more of: accepted, queued, delivered, deferred, bounced, expired, complained, suppressed, scheduled, canceled, and inbound (received inbound mail).
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.
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.
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.
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.
Needs the inbound:manage scope. Its addresses are refused from then on.
Parameters
Name
In
Type
Required
Description
id
path
string (uuid)
yes
Responses
Status
Meaning
Body
204
No Content
—
404
Not 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
Name
In
Type
Required
Description
status
query
string
no
received, delivering, delivered, failed, stored, filtered or expired.
route
query
string (uuid)
no
Only the messages of this route.
before
query
string (uuid)
no
The next of the previous page: the older page after it.
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.
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
Name
In
Type
Required
Description
id
path
string (uuid)
yes
Responses
Status
Meaning
Body
202
Accepted
—
404
Not 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
Name
In
Type
Required
Description
id
path
string (uuid)
yes
Responses
Status
Meaning
Body
204
No Content
—
404
Not 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.
Field
Type
Required
Description
id
string (uuid)
yes
The key making the call.
accepted
integer (int64)
yes
Messages the key had accepted, one per recipient.
sent
integer (int64)
yes
Accepted minus suppressed.
suppressed
integer (int64)
yes
Accepted but never sent, because the address is suppressed.
delivered
integer (int64)
yes
Delivered now; one with a complaint after delivery counts as complained instead.
bounced
integer (int64)
yes
complained
integer (int64)
yes
ApiProjectUsage
Field
Type
Required
Description
id
string (uuid)
yes
billable
integer (int64)
yes
Accepted minus suppressed: what is billed.
accepted
integer (int64)
yes
suppressed
integer (int64)
yes
delivered
integer (int64)
yes
bounced
integer (int64)
yes
complained
integer (int64)
yes
received
integer (int64) or null
no
Inbound 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.
Field
Type
Required
Description
month
string
yes
yyyy-MM.
final
boolean
yes
The month is closed: these numbers no longer change.
The signing secret (whsec_…). Shown once: it is stored encrypted and never returned again.
CreateInboundDomainRequest
Field
Type
Required
Description
name
string
yes
A host name of at least two labels; a subdomain that receives no mail today is best.
confirmExistingMx
boolean
no
Go ahead although the name has MX records of another party: mail to it stops arriving there once its MX points at Postilio.
CreateInboundRouteRequest
Field
Type
Required
Description
domainId
string (uuid)
yes
A receiving domain of the project.
match
string
yes
exact, prefix or catch_all.
value
string
yes
The local part (exact) or its start (prefix), at most 64 characters; empty for catch_all. Stored lower case.
action
string
yes
webhook or store.
endpointId
string (uuid)
no
For a webhook route: an endpoint of the project in the route's mode. The route turns its inbound event on.
spamAction
string
no
filter_reject (the default) or deliver_all.
senderAllow
array of string
no
Addresses or @domain, at most 100; empty or left out takes everyone.
requireDmarc
boolean
no
mode
string
no
live (the default) or test.
description
string
no
At most 200 characters.
CreateSuppressionRequest
Field
Type
Required
Description
address
string
yes
One bare address, at most 254 characters.
CreateWebhookEndpointRequest
Field
Type
Required
Description
url
string
yes
An absolute https:// URL on a public address, at most 2048 characters, without credentials or a fragment.
events
array of string
yes
One or more of: accepted, queued, delivered, deferred, bounced, expired, complained, suppressed, scheduled, canceled, and inbound (received inbound mail).
description
string
no
Optional; at most 200 characters.
mode
string
no
live (the default) or test.
DmarcCheck
Field
Type
Required
Description
status
string
yes
missing (no record), invalid (receivers ignore it), monitoring (the policy that applies is none: reports only) or
enforced (quarantine or reject applies).
policyDomain
string or null
yes
Where 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.
records
array of string
yes
The DMARC records found there, as published.
issues
array of string
yes
Why 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).
policy
string or null
yes
The policy receivers apply to failing mail: none, quarantine or reject, after t=y lowered it one step; null while
missing or invalid.
testing
boolean
yes
True when the record has t=y: the owner is testing the policy, so receivers apply one step less.
DnsRecord
Field
Type
Required
Description
type
string
yes
name
string
yes
value
string
yes
status
string
yes
found, missing, or unknown until the first check.
newValue
string or null
no
Only 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.
newName
string or null
no
Only 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.
Field
Type
Required
Description
domain
string
yes
messages
integer (int64)
yes
DomainList
A list in an object, so paging can be added without breaking clients.
pending, 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.
Only 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
Field
Type
Required
Description
fileName
string
yes
contentType
string
yes
A MIME type such as application/pdf, optionally with parameters.
content
string
yes
The file, base64-encoded.
contentId
string
no
Makes the attachment inline; the HTML refers to it as cid: plus this value.
api, smtp, or test_mail for a test email: how the message was submitted.
sendAt
string (date-time) or null
no
When it is scheduled to go out (sendAt of the request); null when it was sent at once.
EmailEvent
Field
Type
Required
Description
type
string
yes
occurredAt
string (date-time)
yes
smtpCode
integer (int16) or null
yes
The receiving server's reply code; null when no server replied, such as when no connection could be made.
response
string or null
yes
The receiving server's reply, with addresses and IP addresses masked; when no server replied, a sentence that explains what happened.
attempt
integer (int16) or null
no
remoteHost
string or null
no
enhancedCode
string or null
no
classification
string or null
no
reason
string or null
no
Why 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.
async
boolean or null
no
True 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.
Field
Type
Required
Description
status
string
yes
deferred, bounced, complained or expired, now.
reason
string or null
yes
The stable code of the event that set the status (see Delivery status in the docs); null when it has none, as a complaint.
live or test: a test route delivers to a test endpoint.
match
string
yes
exact, prefix or catch_all.
value
string
yes
The local part (exact) or its start (prefix), lower case; empty for a catch-all.
action
string
yes
webhook (to EndpointId) or store (for the API only).
endpointId
string (uuid) or null
yes
The endpoint of a webhook route; null for a store route, or once the endpoint was deleted.
spamAction
string
yes
filter_reject (hold back what rspamd would reject) or deliver_all.
senderAllow
array of string
yes
Only mail from these senders (addresses or @domain, on the From header) is taken; empty takes everyone.
requireDmarc
boolean
yes
Only mail that passes DMARC is taken.
paused
boolean
yes
A paused route asks senders to try again later (450).
description
string or null
yes
createdAt
string (date-time)
yes
JsonElement
any
PlatformKeyRecord
Field
Type
Required
Description
type
string
yes
name
string
yes
status
string
yes
published (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
Field
Type
Required
Description
reason
string
no
Required, at least 10 characters, when the entry is a complaint; kept with the removal.
RotatedWebhookSecret
Field
Type
Required
Description
secret
string
yes
The new signing secret, shown once.
previousSecretExpiresAt
string (date-time)
yes
Until then deliveries are signed with the old secret as well.
SendEmailRequest
Field
Type
Required
Description
from
string
yes
An 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).
to
array of string
yes
1 to 50 bare addresses, without display names; each gets a message of its own.
subject
string
yes
At most 998 characters, without control characters.
text
string
no
The plain-text body; text, html or both.
html
string
no
The HTML body; text, html or both.
tag
string
no
Optional; at most 64 letters, digits, '-' or '_'.
replyTo
string
no
Optional; one address, with or without a display name.
Optional; 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).
cc
array of string
no
Optional; 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.
bcc
array of string
no
Optional; 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.
headers
map of string
no
Optional; 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).
sendAt
string (date-time)
no
Optional; 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
Field
Type
Required
Description
ids
array of string (uuid)
yes
One message per recipient, in the order of to, then cc, then bcc.
suppressed
array of string
yes
Recipients on the project's suppression list: accepted with status suppressed, not sent.