Summarise an email with AI

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

No body. Only when capabilities.ai is true and the holder has accepted the AI terms (POST /ai/consent).

Errors

Status When
401 No token, or the session expired or was signed out. Sign in again with POST /mailbox-auth/login.
403 The account has a temporary password: until POST /security/password succeeds, every other call answers this with error_code: password_change_required.
422 The message has no text to summarise.
502 The AI service did not answer usefully.
503 No AI is set up on this server.

Parameters

NameInTypeDescription
message_idrequiredpathstring

Request

POST/api/v1/mailbox/ai/summarize/{message_id}
curl -X POST 'https://courier.mailyte.com/api/v1/mailbox/ai/summarize/01JBT8XQ2M9WYC3K4F6R7S8T9V' \
  -H 'Authorization: Bearer MAILBOX_TOKEN'

Response

Successful Response

  • dataobject
    • summarystring
    • ai_calls_remaininginteger
200application/json
{
  "type": "success",
  "msg": "Summary generated",
  "data": {
    "summary": "Tunde sent the Q3 figures and wants a call this week.",
    "ai_calls_remaining": 46
  }
}

Returned inside the standard envelope.

Errors

StatusWhen
401No token, or the session expired or was signed out. Sign in again with `POST /mailbox-auth/login`.
403The account has a temporary password: until `POST /security/password` succeeds, every other call answers this with `error_code: password_change_required`.
422The message has no text to summarise.
502The AI service did not answer usefully.
503No AI is set up on this server.

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