Skip to content

Get Thread With Messages

GET
/api/v1/team-chat/threads/{thread_id}
curl --request GET \
--url 'https://api.ultimateteam.ai/api/v1/team-chat/threads/example?limit=100&offset=0&recent=false' \
--header 'X-API-Key: <X-API-Key>'

Get a thread with its messages.

Args: thread_id: The thread UUID string. limit: Maximum messages to return. offset: Message pagination offset. user: The authenticated user context. svc: The conversation service (injected).

Returns: The thread with embedded messages.

Raises: HTTPException: 404 if thread not found.

thread_id
required
Thread Id
string
limit
Limit

Maximum messages to return

integer
default: 100 >= 1

Maximum messages to return

offset
Offset

Message offset for pagination

integer
0

Message offset for pagination

recent
Recent
boolean

Successful Response

Media typeapplication/json
ThreadWithMessages

Thread response with embedded messages.

Attributes: messages: Ordered list 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
messages
Messages
Array<object>
MessageResponse

Response schema for a persisted conversation message.

Attributes: id: Unique message identifier. thread_id: Owning thread identifier. sender_role: Agent role or “user”. sender_id: User ID if sender is human. content: Message content text. message_type: Type of message. artifacts: List of artifact IDs referenced. a2a_task_id: Link to A2A task if applicable. metadata: Extensible metadata. created_at: When the message was created.

object
a2a_task_id
required
Any of:
string
artifacts
required
Any of:
Array<string>
content
required
Content
string
created_at
required
Created At
string format: date-time
id
required
Id
string format: uuid
message_type
required
Message Type
string
metadata
required
Any of:
object
key
additional properties
any
sender_id
required
Any of:
string
sender_role
required
Sender Role
string
thread_id
required
Thread Id
string format: uuid
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"
}
]
}