Capture Correction
POST
/api/v1/ai/corrections
const url = 'https://api.ultimateteam.ai/api/v1/ai/corrections';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"agent_role":"example","correction_context":{},"decision_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","original_output":"example","tenant_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","user_correction":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ultimateteam.ai/api/v1/ai/corrections \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "agent_role": "example", "correction_context": {}, "decision_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "original_output": "example", "tenant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "user_correction": "example" }'Capture a user correction of an agent output.
Persists an agent_corrections row under the AUTHENTICATED tenant.
Pattern extraction happens asynchronously (the row starts with the
default correction_type and no pattern), so no LLM client is needed
on this path.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CorrectionCreate
Request body for capturing a user correction.
object
Examplegenerated
{ "agent_role": "example", "correction_context": {}, "decision_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "original_output": "example", "tenant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "user_correction": "example"}Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
CorrectionResponse
Response body for a single correction record.
object
agent_role
required
Agent Role
string
applied_count
required
Applied Count
integer
correction_context
required
Correction Context
object
key
additional properties
any
correction_type
required
Correction Type
string
created_at
required
Created At
string format: date-time
id
required
Id
string format: uuid
original_output
required
Original Output
string
recurrence_count
required
Recurrence Count
integer
status
required
Status
string
tenant_id
required
Tenant Id
string format: uuid
updated_at
required
Updated At
string format: date-time
user_correction
required
User Correction
string
weight
required
Weight
number
Examplegenerated
{ "agent_role": "example", "applied_count": 1, "correction_context": {}, "correction_type": "example", "created_at": "2026-04-15T12:00:00Z", "decision_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "original_output": "example", "pattern_description": "example", "recurrence_count": 1, "status": "example", "tenant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "updated_at": "2026-04-15T12:00:00Z", "user_correction": "example", "weight": 1}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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" } ]}