Create one order for an approved draft and exact total. Reuse idempotency_key on retries.

post/v1/letters

Request

  • Base URL: https://paperagent.dev
  • URL: https://paperagent.dev/v1/letters
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://paperagent.dev/oauth/authorize, token URL https://paperagent.dev/oauth/token, scopes: letters:write)
    • API key in header X-Api-Key
    • HTTP bearer

Request body

draft_idstring required
confirm_total_centsinteger required
idempotency_keystring required

Response

Success

letter_idstring required
order_idstring required
status'pending_payment' | 'pending_moderation' | 'held_for_review' | 'queued' | 'printed' | 'postage_applied' | 'accepted_by_usps' | 'in_transit' | 'arrived_at_destination_facility' | 'expected_delivery' | 'delivered' | 'blocked' | 'cancelled' | 'payment_abandoned' | 'returned' required

Where the letter is. expected_delivery is the last state a standard or proof-of-mailing letter reaches; only certified tiers ever reach delivered.

checkout_urlstring nullable required
payment_urlstring
payment_status'requires_action' | 'processing' | 'unknown'
mail_date_estimatestring required
messagestring required

Changes

No recorded changes to this operation across all 1 revision of this API.