Idempotency and pagination
Retry sends safely, page through lists, and keep track of messages as they move.
Idempotency
POST /mailboxes/{id}/send and POST …/reply accept an Idempotency-Key header: any string up to 200 characters.
- The first response is stored for 24 hours, per token.
- A repeat with the same key returns that response again, with
Idempotent-Replayed: true, and sends nothing.
curl
curl -X POST https://dropline.cleforyx.com/api/v1/mailboxes/$MB/send \
-H "Authorization: Bearer $DROPLINE_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-4471-shipped" \
-d '{"to":[{"address":"[email protected]"}],"subject":"Your order shipped","text":"It is on its way."}'Pagination
List endpoints take page (0-based) and page_size (1–100, default 25), and return total, page, page_size and has_more.
Request
GET /mailboxes/{mailbox_id}/messages?folder=INBOX&page=0&page_size=25Messages and UIDs
- A message is addressed by mailbox id + folder + uid.
folderis a query parameter. It defaults toINBOX; use thepathfrom List folders for others.- A UID is unique within its folder and changes when the message moves. Move returns the new folder and uid.