Label a batch of messages

POST/api/v1/mailbox/ai/classify
Requires amailbox token— it acts as one mailbox holder, not as the organization.

Classifies up to 20 messages by subject and preview into a closed label vocabulary with a confidence per item. One batch costs one call against the monthly allowance; the response carries ai_calls_remaining.

Request body

Request

POST/api/v1/mailbox/ai/classify
curl -X POST 'https://app.mailyte.com/api/v1/mailbox/ai/classify' \
  -H 'Authorization: Bearer MAILBOX_TOKEN'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Successful Response

Returned inside the standard envelope.

Errors

StatusWhen
422Validation Error

Every status, with what causes it and what to do, is on the error reference.