All requests below will use this key. Your API key is sent directly to api.cueapi.ai and never stored by the docs site.
/v1/executions/{execution_id}/outcomeReport Outcome
Report the outcome of an execution. Write-once: can only be set once per execution.
execution_idstringrequiredpathThe execution UUID.
successbooleanrequiredbodyWhether the handler succeeded.
resultstringbodySuccess message or output summary.
errorstringbodyError message on failure.
metadataobjectbodyStructured data about the execution. Max 10 KB.
external_idstringbodyExternal system identifier for the produced result. Examples: tweet:1234567890, charge:ch_abc123, issue:42.
Max 255 characters.
result_urlstringbodyURL where the produced result can be viewed. Example: https://twitter.com/user/status/1234567890.
result_typestringbodyType of result produced. Examples: tweet, email, file, stripe_charge, github_issue.
Max 50 characters.
summarystringbodyHuman-readable description of what was produced. Max 500 characters. Example: "Morning briefing posted with 3 key updates".
artifactsarraybodyList of created resource IDs or URLs.
Request
curl -X POST https://api.cueapi.ai/v1/executions/{execution_id}/outcome \
-H "Authorization: Bearer cue_sk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"success": true,
"result": "Report generated: 847 chars",
"metadata": {"rows_processed": 142}
}'const response = await fetch(
`https://api.cueapi.ai/v1/executions/${executionId}/outcome`,
{
method: "POST",
headers: {
"Authorization": "Bearer cue_sk_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
success: true,
result: "Report generated: 847 chars",
metadata: { rows_processed: 142 },
}),
}
);
const data = await response.json();curl -X POST https://api.cueapi.ai/v1/executions/{execution_id}/outcome \
-H "Authorization: Bearer cue_sk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"success": false,
"error": "Database connection timeout",
"metadata": {"error_code": "DB_TIMEOUT"}
}'const response = await fetch(
`https://api.cueapi.ai/v1/executions/${executionId}/outcome`,
{
method: "POST",
headers: {
"Authorization": "Bearer cue_sk_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
success: false,
error: "Database connection timeout",
metadata: { error_code: "DB_TIMEOUT" },
}),
}
);
const data = await response.json();Response
{
"execution_id": "550e8400-e29b-41d4-a716-446655440000",
"outcome": {
"success": true,
"result": "Report generated: 847 chars",
"metadata": {"rows_processed": 142},
"recorded_at": "2026-03-13T09:01:23Z"
}
}{
"error": {
"code": "outcome_already_reported",
"message": "Outcome already recorded for this execution",
"status": 409
}
}Outcome state
After reporting, the execution's outcome_state is set based on the cue's verification policy:
| Verification mode | Evidence provided | Resulting state |
|---|---|---|
none (default) | Any | reported_success or reported_failure |
require_external_id | external_id present | verified_success |
require_external_id | external_id missing | verification_failed |
manual | Any | verification_pending |
The outcome_success boolean is always preserved for backward compatibility.
/v1/executions/{execution_id}/outcome