chat.conversation.archive ​
Archive an existing chat conversation for a (organization, user) pair
Archive a chat conversation for a (organization, user) pair.
Inputs:
- organization_uuid: UUID of the organization (required)
- user_uuid: UUID of the user opening the chat (required, must be a member)
- conversation_uuid: UUID of the conversation to archive (required)
Outputs:
- conversation_uuid: ChatConversation.uuid
- archived: true
- title: resolved conversation title
Failure reasons:
- organization_not_found_or_unauthorized
- conversation_not_found
- validation_failed
- database_error
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-chat |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | UUID of the organization that owns the conversation |
user_uuid | uuid | No | — | UUID of the MEMBER that owns the conversation. Required for a member run; refused on an end-user run, where the owner is the server-resolved principal from the verified token |
conversation_uuid | uuid | Yes | — | UUID of the chat conversation to archive |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
conversation_uuid | uuid | Yes | — | Archived ChatConversation.uuid |
archived | boolean | Yes | — | True when the conversation is archived |
title | string | No | — | Conversation title |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | integer | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
organization_uuid | uuid | No | — | — |
user_uuid | uuid | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "chat.conversation.archive",
"initial_data": {
"organization_uuid": "value",
"conversation_uuid": "value"
}
}