Inbox and uploads

intake.fromMail

File an attachment of an email in the workspace's mail (messageId, evidenceId, idempotencyKey) through universal intake: it becomes an uploaded file like a dropped one, ready for intake.classify and intake.process, and remembers the email it came from. Attachments of mail held for an administrator (quarantined, or holding sign-in or security details) can't be filed. The same file already added returns that upload with duplicate: true.

POST/api/v1/accounting/intake.fromMail

Permissions

accounting:readaccounting:writemail:read

Who can call it

admin, finance

Retries

Idempotency key required

MCP

accounting_intake_from_mail

Fields

  • messageIdstring (ID)Required

    The ID of the related record.

  • evidenceIdstring (ID)Required

    The ID of the related record.

  • 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–200 characters

Example

curl https://app.getoatmilk.com/api/v1/accounting/intake.fromMail \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "messageId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
  "evidenceId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
}'
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/intake.fromMail
curl https://app.getoatmilk.com/api/v1/accounting/intake.fromMail \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "messageId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
  "evidenceId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
}'

More in Inbox and uploads.