Letter events
CartaFlow POSTs to your webhook URL on every status change of a letter, and with `letter.updated` when it is changed in the dashboard before production, with the event in the body.
webhook-id*stringEvent id. The same on every delivery attempt of an event: use it to ignore repeats.
webhook-timestamp*stringTime of sending in Unix seconds. Reject deliveries more than 5 minutes away from your clock.
webhook-signature*stringHMAC-SHA256 signature following the Standard Webhooks spec. Verify it before trusting the content; see the Webhooks guide.
application/json- body
Something that happened in your account, such as a letter being posted. CartaFlow sends each event to your webhooks and keeps it for 30 days.
id*stringUnique identifier of the event. It is the same value as the webhook-id header: use it to ignore repeated deliveries. Always starts with evt_.
^evt_[A-Za-z0-9]+$object*stringObject type. Always event.
type*stringThe event type.
Possible values
letter.scheduled: A letter was scheduled withsend_date. It has not been charged yet.letter.received: A letter was charged and joined the production queue: right after creation or, if it was scheduled, on its send date. Covers letters created through the API and the dashboard.letter.in_production: The letter joined a print batch and can no longer be canceled.letter.printed: The letter was printed and enveloped.letter.posted: The letter was handed to Correios. It is the last event of a letter that was sent.letter.canceled: The letter was canceled. Checkcancellation_reason:requestedwhen you canceled it,insufficient_balancewhen a scheduled letter could not be charged on its date.letter.failed: The letter failed in production and will not be posted. The amount went back to the balance automatically. Checkfailure_reason.letter.updated: The letter was changed in the dashboard before production, without changing status: send date, address, file, variables, printing, Correios services or reference.datacarries the letter as it is now. When the change altered the price of a scheduled letter,pricehas the new amount.
"letter.scheduled""letter.received""letter.in_production""letter.printed""letter.posted""letter.canceled""letter.failed""letter.updated"data*|The full object as it was right after the event: a letter for letter.* events and a verification for verification.* events.
created_at*stringWhen the event happened.
date-timeAnswer with any 2xx status within 15 seconds to confirm receipt. Do slow work after answering.
Example Requests
/letter-events