Skip to content

Request Approval

POST
/api/v1/team-chat/threads/{thread_id}/approvals
curl --request POST \
--url https://api.ultimateteam.ai/api/v1/team-chat/threads/example/approvals \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "deadline_seconds": 300, "escalation_chain": [ "example" ], "requester_role": "example", "suggested_action": "example", "target_role": "example", "what": "example", "why": "example" }'

Request approval within a conversation thread.

Args: thread_id: The thread UUID string. body: Approval request data. user: The authenticated user context. svc: The approval service (injected).

Returns: The approval request message.

thread_id
required
Thread Id
string
Media typeapplication/json
ApprovalRequest

Input schema for requesting approval from another agent or user.

Attributes: what: Description of what needs approval. why: Reason the approval is needed. suggested_action: The proposed action to approve. deadline_seconds: Timeout before escalation (default 300s). escalation_chain: Ordered list of escalation targets. requester_role: Agent role requesting approval. target_role: Agent role or “user” being asked to approve.

object
deadline_seconds
Deadline Seconds
integer
default: 300
escalation_chain
Escalation Chain
Array<string>
requester_role
required
Requester Role
string
suggested_action
required
Suggested Action
string
target_role
required
Target Role
string
what
required
What
string
why
required
Why
string

Successful Response

Media typeapplication/json
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
Examplegenerated
{
"a2a_task_id": "example",
"artifacts": [
"example"
],
"content": "example",
"created_at": "2026-04-15T12:00:00Z",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"message_type": "example",
"metadata": {},
"sender_id": "example",
"sender_role": "example",
"thread_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

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"
}
]
}