inbox.accept_draft
Approve an AI-generated draft, swapping aiLayer to 'manual' (operator chain-of-custody). For stay-bound conversations, delivers the message via the channel dispatcher (real outbound send + message.sent event) and removes the draft row. For loose threads (no stay), flips the draft to state=sent in place (flip-only, no delivery). Optional bodyOverride lets the operator edit the suggestion before sending.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
draftId | string | yes | |
bodyOverride | string | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
messageId | string | yes | |
channel | string | yes | |
delivered | boolean | yes |
inbox.draft_reply
Run the P2.2 AI pipeline (L0 sensitive / L1 rules / L2 LLM) for a given inbound message and persist a draft outbound message row. Returns the resulting draft. NOTE: This writes a draft (not pure read-only) — operators can then send it via inbox.accept_draft.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
messageId | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
draftId | string · nullable | yes | |
body | string · nullable | yes | |
aiLayer | string · nullable | yes | |
confidence | number · nullable | yes |
inbox.list_by_stay
List all sent messages (inbound + outbound) for a stay's conversation, oldest-first. Excludes drafts. Read-only.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items.messageId | string | yes | |
items.direction | enum | yes | One of: inbound, outbound |
items.channel | enum | yes | One of: whatsapp, email, hospitable, voice, channex, beds24 |
items.sender | string · nullable | yes | |
items.body | string · nullable | yes | |
items.aiLayer | string · nullable | yes | |
items.sentAt | string | yes |
inbox.list_triage
Paginated triage feed of messages across the tenant, newest first. Cursor is the ISO timestamp of the last item from the previous page. filter='all' is the only meaningful value in v1; other values currently return the same data (filter logic lands in P2.2).
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
filter | enum | no | One of: all, mine, sensitive, unanswered — Default: "all" |
limit | integer | no | Default: 25 |
cursor | string | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items.messageId | string | yes | |
items.conversationId | string | yes | |
items.channel | string | yes | |
items.direction | string | yes | |
items.sender | string · nullable | yes | |
items.body | string · nullable | yes | |
items.sentAt | string | yes | |
items.aiLayer | string · nullable | yes | |
nextCursor | string · nullable | yes |
inbox.list_unanswered
List up to 50 inbound guest messages where no operator reply has been sent in the same conversation since the inbound. Newest-first. Read-only.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items.messageId | string | yes | |
items.conversationId | string | yes | |
items.stayId | string · nullable | yes | |
items.channel | enum | yes | One of: whatsapp, email, hospitable, voice, channex, beds24 |
items.sender | string · nullable | yes | |
items.body | string · nullable | yes | |
items.sentAt | string | yes |
inbox.send_reply
Send an outbound reply for a stay's conversation. Channel auto-resolves from the latest message in the thread (email/whatsapp/hospitable). Persists the outbound message and emits the message.sent webhook.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes | |
body | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
messageId | string | yes | |
channel | enum | yes | One of: email, whatsapp, hospitable, beds24 |
conversationId | string | yes |