messages

Batch operate on messages by id

Applies one action (mark_read | delete | fetch) across up to 100 of your message ids in one call. An id that does not exist and an id owned by another account both return status: not_found. Requires a paid plan (402 plan_upgrade_required on Free). The body is validated before the plan check: a malformed body is always 422 validation_error, for every plan. mark_read and delete are idempotent: repeating the call returns the same shape without changing anything again. Idempotency-Key applies to mark_read and delete only; it is ignored for fetch, which always returns fresh data.

post/messages/batch

Request

  • Base URL: https://dash.mailsocket.app/api/v1
  • URL: https://dash.mailsocket.app/api/v1/messages/batch
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Optional. 1-255 printable ASCII characters (use a UUID). Scoped to the API key that sends it and kept for 24 hours. A retry with the same key and the same body replays the first response (with Idempotent-Replayed: true) and creates nothing new. The same key with a different body or endpoint returns 422 idempotency_key_reused; while the first request is still running, 409 idempotency_in_progress. Stored: 2xx, and 400/404/422 validation errors. Not stored (a retry runs again): outcomes you can fix and retry (402, 403, 409, and 422 domain_not_found_or_unverified), 429 and 5xx. An invalid value, or a body too large to read, returns 400 validation_error.

Request body

action'mark_read' | 'delete' | 'fetch' required
idsstring[] required

Message public ids. Duplicates are de-duplicated (order-preserving) before processing.

Response

Per-id results, in the same order as the input ids.

Changes

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