All requests below will use this key. Your API key is sent directly to api.cueapi.ai and never stored by the docs site.

POST/v1/executions/{execution_id}/outcome

Report Outcome

Report the outcome of an execution. Write-once: can only be set once per execution.

execution_idstringrequiredpath

The execution UUID.

successbooleanrequiredbody

Whether the handler succeeded.

resultstringbody

Success message or output summary.

errorstringbody

Error message on failure.

metadataobjectbody

Structured data about the execution. Max 10 KB.

external_idstringbody

External system identifier for the produced result. Examples: tweet:1234567890, charge:ch_abc123, issue:42. Max 255 characters.

result_urlstringbody

URL where the produced result can be viewed. Example: https://twitter.com/user/status/1234567890.

result_typestringbody

Type of result produced. Examples: tweet, email, file, stripe_charge, github_issue. Max 50 characters.

summarystringbody

Human-readable description of what was produced. Max 500 characters. Example: "Morning briefing posted with 3 key updates".

artifactsarraybody

List of created resource IDs or URLs.

Request

bash
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}
  }'
javascript
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();
bash
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"}
  }'
javascript
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

json
{
  "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"
  }
}
json
{
  "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 modeEvidence providedResulting state
none (default)Anyreported_success or reported_failure
require_external_idexternal_id presentverified_success
require_external_idexternal_id missingverification_failed
manualAnyverification_pending

The outcome_success boolean is always preserved for backward compatibility.

POST/v1/executions/{execution_id}/outcome
Try it
Replace path parameters (e.g. {cue_id}) in the URL before sending.
Request Body
Enter your API key above to send requests
How do I know if my agent ran successfully?
Ctrl+K