Skip to content
Proud to collaborate with Microsoft for Startups

chat.conversation.create ​

Create a new chat conversation owned by a member or an app end-user

Create a new 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)
  • title: optional thread title (default "New conversation")
  • seed_system_message: optional system-role first message
  • metadata: free-form dict persisted on the conversation row

Outputs (terminal state_data):

  • conversation_uuid: ChatConversation.uuid
  • created_at: ISO-8601 timestamp
  • title: resolved title

Failure reasons:

  • organization_not_found_or_unauthorized
  • validation_failed
  • database_error

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-chat
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—UUID of the organization that owns the conversation
user_uuiduuidNo—UUID of the MEMBER opening the chat (must be a member of the org). Required for a member run; refused on an end-user run, where the owner is the server-resolved principal from the verified token
titlestringNo—Conversation title (default 'New conversation', max 200 chars)
seed_system_messagestringNo—Optional system-role seed message (max 8000 chars)
metadatajsonNo—Free-form metadata persisted on the conversation row (default empty)

Output Schema ​

FieldTypeRequiredDefaultDescription
conversation_uuiduuidYes—Created ChatConversation.uuid (external identifier)
created_atstringYes—ISO-8601 creation timestamp of the conversation
titlestringYes—Resolved conversation title
failure_reasonstringNo—Controlled-vocabulary failure key OR raw engine message
errorstringNo—Human-readable error detail (echoed by action_fail)
error_typestringNo—Exception class name (engine-stamped)
failed_at_statestringNo—State name where the failure occurred (engine-stamped)
failed_stepstringNo—DAG step name where the failure occurred (engine-stamped)
failed_layerstringNo—DAG layer where the failure occurred (engine-stamped)
organization_uuiduuidNo—Organization UUID echoed by action_fail
user_uuiduuidNo—User UUID echoed by action_fail

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "chat.conversation.create",
  "initial_data": {
    "organization_uuid": "value"
  }
}