Skip to main content
POST
Verify a letter PDF's layout before sending

Authorizations

Authorization
string
header
required

Dairo API key, e.g. dairo_test_... or dairo_live_...

Body

application/json

Exactly one document source must be provided: pdfBase64, file, or templateId (with templateData + to — the render composites the recipient). Passing to is strongly recommended: it enables the printed-address match check.

pdfBase64
string | null

Base64-encoded PDF to verify (max 4 MB for verification).

file
object | null

Reuse a PDF already stored in Dairo as the letter — no re-upload. Provide EXACTLY ONE of attachmentId (an email attachment) or objectId (a storage object from the buckets API). Providing both, or neither, is a 400.

templateId
string | null

Verify a stored template's render. Requires to.

templateData
object | null
to
object | null

The intended recipient — enables the printed-address match check. Required with templateId.

from
object | null

Optional return address (template path only).

print
object
maxPages
integer | null

Optional page-count ceiling enforced as a fail check.

Required range: x >= 1
delivery
enum<string> | null

Pass the SAME delivery class you will send with. registered letters use a DIFFERENT address geometry — the carrier prints its registered-mail label into y=50–67mm, so the recipient block must sit in y=67–90mm — and are verified against it.

Available options:
economy,
priority,
registered,
bulk,
premium
payment
object | null

The structured payment object the create will carry. Template letters are rendered WITH the generated slip so the verified PDF is the exact PDF the create would mail. Template-path only (mirrors the create's rule).

Response

Success

The structured layout verdict for a letter PDF.

object
enum<string>
required
Available options:
letter_verification
valid
boolean
required

True when NO check failed. Warnings may still be present.

checks
object[]
required
pageCount
integer
pageSize
object | null
addressPlacement
enum<string> | null

The window where the recipient address was detected, or null when none was found.

Available options:
left,
right,
null
addressLines
string[]

The text lines detected inside the address window, top to bottom.

summary
string
agentHint
string

The recommended next step.