Skip to content

Create Thread

POST
/api/v1/team-chat/threads
curl --request POST \
--url https://api.ultimateteam.ai/api/v1/team-chat/threads \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "context_id": "example", "metadata": {}, "participant_roles": [ "example" ], "title": "example", "workflow_run_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Create a new conversation thread.

Args: body: Thread creation data. user: The authenticated user context. svc: The conversation service (injected).

Returns: The created thread.

Media typeapplication/json
ThreadCreate

Input schema for creating a conversation thread.

Attributes: context_id: Groups related A2A messages. title: Optional human-readable thread title. participant_roles: List of agent role strings. workflow_run_id: Optional FK to workflow_runs.id. metadata: Optional extensible metadata.

object
context_id
required
Context Id
string
>= 1 characters <= 255 characters
metadata
Any of:
object
key
additional properties
any
participant_roles
Participant Roles
Array<string>
title
Any of:
string
<= 512 characters
workflow_run_id
Any of:
string format: uuid
Examplegenerated
{
"context_id": "example",
"metadata": {},
"participant_roles": [
"example"
],
"title": "example",
"workflow_run_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Successful Response

Media typeapplication/json
ThreadResponse

Response schema for a persisted conversation thread.

Attributes: id: Unique thread identifier. tenant_id: Owning tenant UUID. context_id: Groups related A2A messages. title: Human-readable thread title. status: Thread lifecycle state. participant_roles: List of agent role strings. workflow_run_id: Optional FK to workflow_runs.id. metadata: Extensible metadata. created_at: When the thread was created. updated_at: When the thread was last updated. message_count: Number of messages in the thread.

object
context_id
required
Context Id
string
created_at
required
Created At
string format: date-time
id
required
Id
string format: uuid
message_count
Message Count
integer
0
metadata
required
Any of:
object
key
additional properties
any
participant_roles
required
Participant Roles
Array<string>
status
required
Status
string
tenant_id
required
Tenant Id
string format: uuid
title
required
Any of:
string
updated_at
required
Updated At
string format: date-time
workflow_run_id
required
Any of:
string format: uuid
Example
{
"message_count": 0
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}