---
title: "Execute a decision via webhook"
method: POST
path: "/v1/decisions/{decision_id}/execute"
tags: ["Decision Memory"]
---

# Execute a decision via webhook

`POST /v1/decisions/{decision_id}/execute`

## Request

- Base URL: `https://api.algenta.ai`
- URL: `https://api.algenta.ai/v1/decisions/{decision_id}/execute`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Fire the decision to an external webhook URL, turning the logged decision into an automated action. The webhook receives the full decision context (chosen action, expected value, confidence, risk profile, integrity hashes). Execution status and the HTTP response code are persisted back to the decision log for full audit trail. Re-execution is allowed — each call overwrites the prior receipt.

## Path parameters

- `decision_id` string, uuid, required

## Request body

- ExecuteDecisionRequest: Body for POST /v1/decisions/{id}/execute — fire the decision to a webhook.
  - `webhook_url` string, required: HTTPS endpoint that will receive and act on this decision.
  - `timeout_seconds` number: Webhook request timeout in seconds.
  - `force` boolean: Override the idempotency gate. Pass true to re-execute a decision that was already delivered. Does NOT override confidence or risk_floor gates.
  - `override_safety` boolean: Bypass confidence and risk_floor policy gates for this single execution. Requires explicit intent. Logs the override for audit.
  - `metadata` object, nullable: Optional extra key-value pairs merged into the webhook payload.

## Response `200`

Successful Response

- DecisionWebhookReceipt: Returned by POST /v1/decisions/{id}/execute. Renamed from ExecutionReceipt (A4 follow-up): apps.api_server.schemas.receipt.ExecutionReceipt is the versioned, governed-execution receipt (plan_hash, approval_state, execution_id, ...). This is an unrelated concept -- confirmation that a logged decision's webhook fired, carrying policy_snapshot_id/schema_snapshot_id/manifest_version instead -- that happened to share the class name. FastAPI safely disambiguates two same-named schemas by fully-qualified module path (verified), so nothing was broken today, but the moment anything in this app types a field as the OTHER ExecutionReceipt, the published OpenAPI spec gets two components both titled "ExecutionReceipt" -- confusing for a human reading Swagger UI and for a generated SDK's class names. Fixed before it could bite rather than after.
  - `decision_id` string, uuid, required
  - `webhook_url` string, required
  - `execution_status` string, required
  - `response_code` integer, nullable, required
  - `executed_at` string, date-time, required
  - `policy_snapshot_id` string, required
  - `schema_snapshot_id` string, required
  - `manifest_version` string, required
  - `payload_summary` object, required
  - `safety_overridden` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/codna/apis/algenta-api.md) · [All operations](https://skmtc.dev/codna/apis/algenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codna/apis/algenta-api/revisions/35d30f84a5df?raw)
