Record a known outcome
Record a known outcome. This action uses the same domain service from REST and MCP, so successful calls produce the same canonical domain result.
Authorization and availability
Required scope: outcomes:write. Available in Test and Live. REST operation: POST /v1/evaluations/{id}/outcome. Equivalent MCP tool: veltor_report_outcome.
Request schema
Unknown fields are rejected. Path values shown in the route are combined with the JSON body or query input before validation.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"outcome": {
"type": "string",
"enum": [
"granted",
"not_granted",
"reversed"
]
},
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 500
},
"external_outcome_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[\\x21-\\x7e]+$"
}
},
"required": [
"id",
"outcome"
],
"additionalProperties": false
}Example request payload
{
"id": "00000000-0000-4000-8000-000000000001",
"outcome": "granted",
"external_outcome_id": "outcome_customer_123"
}Response schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}Example success response
REST returns this canonical domain result as JSON. MCP returns the same value in structuredContent and adds only its transport request ID.
{
"evaluation_id": "00000000-0000-4000-8000-000000000001",
"outcome_state": "granted",
"conflicts": []
}Errors and recovery
Relevant errors include invalid input (422), missing scope or organization access (403), missing resources (404), revision or idempotency conflicts (409), rate limits (429), and deadline exhaustion (504). Use the returned request ID when investigating a failure.
Idempotency, retries, and timeout
Send a stable idempotency key and reuse it only for an exact retry of this mutation. The server deadline is 5 seconds. Retry only when the error reports retryable true.
cURL
curl -X POST https://veltor.dev/v1/evaluations/RESOURCE_ID/outcome \
-H "Authorization: Bearer $VELTOR_SECRET_KEY" \
-H "Veltor-Organization: $VELTOR_ORGANIZATION" \
-H "Idempotency-Key: operation_123" \
-H "Content-Type: application/json" \
--data '{"outcome":"granted","external_outcome_id":"outcome_customer_123"}'Node SDK
const result = await veltor.call("/v1/evaluations/RESOURCE_ID/outcome", {
method: "POST",
input: {"id":"00000000-0000-4000-8000-000000000001","outcome":"granted","external_outcome_id":"outcome_customer_123"},
idempotencyKey: "operation_123",
});MCP
veltor_report_outcome({
"id": "00000000-0000-4000-8000-000000000001",
"outcome": "granted",
"external_outcome_id": "outcome_customer_123",
"idempotency_key": "operation_123"
})