Create a draft
Send"draft": true to POST /api/postcards. Every field is optional, so you can save a draft before you know the address or the final text.
201 Created with "status": "draft" and "submitted_at": null. Creating a draft:
- uses no credit and doesn’t need a credit balance;
- doesn’t count toward the daily limit of 100 postcards;
- checks each field you send (length, postal code format, font), but not whether the text fits on the card or the address fits on the envelope. Those checks run when you submit.
422 with an error on draft. Submit or delete some drafts first.
Without draft, or with "draft": false, POST /api/postcards orders the postcard right away, as before.
Edit a draft
PATCH /api/postcards/{id} changes only the fields you send. Send null to clear a field. address and recipient are replaced as a whole, so send all their parts.
You can’t set
status yourself. A draft becomes an order only when you submit it.
To check how the draft looks, use POST /api/postcards/preview with the same content, signature, and font_id.
Submit a draft
POST /api/postcards/{id}/submit orders the draft. It needs no body, but it does need an Idempotency-Key.
"status": "new" and submitted_at, and starts the content check.
A draft is never charged twice. After a
402 or 422, fix the cause and submit again with the same key.
Delete a draft
204 No Content when the draft is gone. Deleting is permanent. Submitted postcards can’t be deleted and return 409.
Find your drafts
GET /api/postcards?status=draft lists only drafts. See Track postcards.