Create a letter
Pass the PDF aspdfBase64, a fileName, and a recipient to address.
Everything else has defaults.
letter object at status: "queued" — accepted and being
prepared, nothing printed yet. pageCount and price are null until the
letter is priced.
Document sources
A letter’s document comes from exactly one of three sources:file: reuse an email attachment
file: reuse a storage object
422; an oversize file with 413. Providing more than one source — or
none — is a 400.
Request fields
The recipient’s
country must be a destination Dairo can deliver to. An
unsupported or malformed country is rejected with 422 naming to.country.List letters
List your letters, most recent first. Page withlimit (1–100, default 20)
and cursor using keyset pagination, and filter by
status, country, or batchId.
to block carries only the recipient’s city and
country, never the full address.
Get one letter
Fetch a letter byid to read its current status, price, any
trackingNumber, and its full address, with the delivery events timeline
inlined newest first (up to 100 events). Fetching an in-flight letter also
refreshes its tracking state, so a poll returns the latest known status.
404 — the two cases are
indistinguishable by design.
Cancel a letter
Cancel a letter that has not been dispatched. Cancellation is allowed while the letter isdraft, queued, processing, printable, or submitted —
once it is in_transit it is in the postal network and cannot be recalled.
status: "canceled" and canceledAt set.
Canceling a letter that is already past dispatch returns 409 Conflict with
code: "letter_not_cancelable".
List a letter’s events
Fetch the delivery timeline on its own. Events come back newest first, up to the 100 most recent.Price a letter
A letter’s cost depends on its page count, print options, delivery class, and destination.POST /v1/letters/price returns the exact cost without creating
a letter — pass a pageCount, or the pdfBase64 itself and Dairo counts the
pages.
cURL
Next steps
- Send a batch — one template, up to 1,000 recipients, in one call.
- API reference — full request and response schemas for every letters endpoint.