List labels
Paginated list of non-deleted labels (conversation_labels rows). Used by the chat-list label filter chip and the Settings β Labels screen.
Sort is stable across pages β created_at sorts tiebreak on id in the same direction; name sorts always tiebreak on id DESC. Both mirror chatmo-dashboard /api/conversation-labels.
assignments_count is the number of active rows in conversation_label_assignments pointing at the label. Soft-deleted labels are excluded entirely.
query Parameters
qILIKE substring on conversation_labels.name.
page1-indexed page number. Capped at 500 to bound deep-scan cost.
limitRows per page. Capped at 100.
sort_bysort_orderList labels βΊ Responses
Labels page.
successCreate a label
Creates a new label scoped to the requesting organization. name must be unique among non-deleted labels in the org (case-sensitive comparison). created_by / updated_by on the row are populated from the auth identity automatically.
Create a label βΊ Request Body
namecolor^#[0-9a-fA-F]{6}$Β Β·Β requiredCreate a label βΊ Responses
Created.
successcodemessageDelete a label
Soft-deletes the label by stamping deleted_at = NOW(). Existing conversation_label_assignments rows are intentionally preserved β the dashboard's join filter WHERE label.deleted_at IS NULL is the source of truth for visibility. This lets a future undo-delete feature restore the label without losing assignments.
path Parameters
label_idUUID of the label (conversation_labels row).
Delete a label βΊ Responses
Soft-deleted.
successmessagedataUpdate a label
Partial update β rename, recolor, or both. Either field may be omitted; an entirely empty body is rejected with 400 at least one of name or color is required.
path Parameters
label_idUUID of the label (conversation_labels row).
Update a label βΊ Request Body
namecolor^#[0-9a-fA-F]{6}$Update a label βΊ Responses
Updated.
success