Inbox and uploads

mail.rerunMany

Process up to 50 emails again in one request, with items [{id, expectedRevision}], from (everything, reading or review, as in mail.rerun) and idempotencyKey. Each email gets its own job; returns queued [{id, jobId, generation}] and failed [{id, code, message}] so one stale or already-added email doesn't stop the rest.

POST/api/v1/accounting/mail.rerunMany

Permissions

mail:readmail:write

Who can call it

admin, finance

Retries

Idempotency key required

MCP

accounting_mail_rerun_many

Fields

  • itemsarray of objectsRequired

    1–50 items

  • fromenum

    The first date to include, as YYYY-MM-DD.

    everythingreadingreview

    Default "everything"

  • reasonstring

    A short note saying why, kept in the record's history.

    1–500 characters

  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–160 characters

Example

curl https://app.getoatmilk.com/api/v1/accounting/mail.rerunMany \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "items": [
    {
      "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
      "expectedRevision": 3
    }
  ]
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/mail.rerunMany
curl https://app.getoatmilk.com/api/v1/accounting/mail.rerunMany \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "items": [
    {
      "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
      "expectedRevision": 3
    }
  ]
}'

More in Inbox and uploads.