Assign agents and teams, manage collaborators and labels, toggle the AI agent, transition status, and generate AI summaries / quick replies.
List collaborators on a conversation
ACTIVE collaborators (additional agents invited alongside the primary Handled By agent). Used by the chat-info panel's Collaborators section and by the collaborator-picker bottom sheet to exclude already-added users.
Soft-removed rows (status = REMOVED / removed_at IS NOT NULL) are intentionally excluded β they exist for audit but the picker only cares about live collaborators.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
List collaborators on a conversation βΊ Responses
Collaborator list.
successAdd a collaborator
Add a user as an ACTIVE collaborator on the conversation. Idempotent: an existing ACTIVE row is returned as-is; a soft-removed row (status = REMOVED) is re-activated (cleared removed_at / removed_by, fresh added_by / added_at) so the UNIQUE(conversation_id, user_id) index stays clean.
Emits conversation_history.JOIN over the WebSocket so connected clients reconcile in real time without a follow-up REST refetch.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
Add a collaborator βΊ Responses
Added (or re-activated).
successRemove a collaborator
Soft-remove the collaborator: flips status = REMOVED, stamps removed_at + removed_by. The row stays in the table for audit so message_count / last_message_at history survives.
Emits conversation_history.LEAVE.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
user_idUUID of the user.
Remove a collaborator βΊ Responses
Removed.
successGet current Handled By
Read the current Handled By assignment. Surfaces one of three terminal shapes β agent assignment, team assignment, or unassigned β so the chat info panel renders the right pill without branching on multiple null checks.
When a team is assigned, team.members[] is included so the dashboard can show member avatars inline. The assigned agent's full identity (avatar, job_title) is enriched the same way.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
Get current Handled By βΊ Responses
Assignment snapshot.
successReturned in three terminal shapes β agent, team, or unassigned. The client renders the appropriate pill without branching on multiple null checks.
Assign agent or team
Assign or change the conversation's primary Handled By β exactly one of assigned_agent_id OR assigned_team_id per request. Assigning an agent clears any team assignment and vice versa (the dashboard relies on this invariant β only one is rendered at a time).
Emits conversation_history.ASSIGNED so real-time subscribers update the chat tile and detail header.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
Assign agent or team βΊ Request Body
assigned_agent_idassigned_team_idreasonAssign agent or team βΊ Responses
Assignment updated.
successToggle the AI agent on a conversation
Toggle conversations.is_auto_replied. When false, the AI agent stops auto-replying and the chat falls back to manual agent handling.
Emits conversation_history.AI_AGENT_ACTIVATED or AI_AGENT_DEACTIVATED depending on the new value.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
Toggle the AI agent on a conversation βΊ Request Body
is_activetrue enables auto-reply, false pauses it.
reasonToggle the AI agent on a conversation βΊ Responses
Toggled.
successResolve, reopen, archive
Transition the conversation status β OPEN, PENDING, RESOLVED, ARCHIVED. Entering RESOLVED stamps resolved_at; reopening from RESOLVED clears it.
Transition rules:
ARCHIVED β OPENis rejected (cannot reopen an archived conversation).- Identity transitions are rejected (
conversation is already RESOLVEDetc).
Emits conversation_history.STATUS_CHANGE with the new value and reason.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
Resolve, reopen, archive βΊ Request Body
statusreasonResolve, reopen, archive βΊ Responses
Transitioned.
successList labels on a conversation
Labels currently assigned to the conversation. Powers the chat-info panel's Labels section. Embeds the catalog name and color on each row so the chip cluster renders without a follow-up label lookup.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
List labels on a conversation βΊ Responses
Label assignments.
successAttach a label
Assign a single label to the conversation. Idempotent: returns the existing assignment row if one already exists for the (conversation_id, label_id) pair. The label must exist in the same organization's conversation_labels catalog (create one via POST /labels first).
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
Attach a label βΊ Responses
Attached.
successAttach multiple labels at once
Attach multiple labels to one conversation in a single round-trip. Same dedupe rule as the single-label endpoint (UNIQUE(conversation_id, label_id)) β existing assignments are reported as skipped. Unknown or cross-organization label ids surface in failed so the caller can render a per-id outcome instead of guessing why a subset did not land. Cap: 50 label_ids per request.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
Attach multiple labels at once βΊ Request Body
label_idsAttach multiple labels at once βΊ Responses
Bulk attach applied.
successDetach a label
Remove a single label assignment (the chip Γ). Hard-deletes the junction row β conversation_label_assignments has no soft-delete column. Idempotent: missing rows return success.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
label_idUUID of the label (conversation_labels row).
Detach a label βΊ Responses
Detached.
successGenerate an AI summary of the conversation
Generate an AI-powered summary of the last 40 messages in the conversation. Idempotent β the first call computes the summary, persists it as a private AI_SUMMARY-type message, and broadcasts it to agents. Subsequent calls with the same message set return the cached structured summary (is_cached: true) without hitting the LLM again. The fingerprint resets when new messages arrive.
Structured output: customer's intent, three or more key points, and recommended next actions β ready for the mobile profile screen's AI Summary sheet.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
Generate an AI summary of the conversation βΊ Responses
Fresh or cached summary.
successGenerate three quick-reply suggestions
Generate three tone-tagged reply suggestions for the agent's next message. Hits the LLM on every call β no cache, since suggestions are tightly coupled to whatever the agent is mid-typing and caching would defeat the point.
The composer's AI Quick Reply tile fetches these on demand and renders the suggestions as tappable pills. Tones: friendly, professional, empathetic. The suggested text follows the conversation's recent language context.
path Parameters
conversation_idUUID of the conversation. Cross-tenant access returns 404 conversation not found.
Generate three quick-reply suggestions βΊ Responses
Three suggestions.
success