Summarise a conversation with AI

POST/api/v1/mailbox/ai/summarize/thread/{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.
404 Message not found.
422 The conversation has no text to summarise.

Parameters

NameInTypeDescription
message_idrequiredpathstring

Request

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

Response

Successful Response

  • dataobject
    • summarystring
    • message_countinteger
    • ai_calls_remaininginteger
200application/json
{
  "type": "success",
  "msg": "Thread summary generated",
  "data": {
    "summary": "Ada and Tunde agreed the Q3 figures; Q4 forecast due Friday.",
    "message_count": 6,
    "ai_calls_remaining": 45
  }
}

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`.
404Message not found.
422The conversation has no text to summarise.

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