postExecute a decision

Runs the decision using the deployment routing configured for the selected environment. Environment configuration variables are resolved for the run. A deployment and routing must exist; sub-decisions cannot be executed directly. The call is synchronous and persists an execution. Check status even on HTTP 201: a node failure can return FAILED with result.error and a trace. Hard engine failures can instead return a non-2xx error. Successful runs normally omit trace. Send an Idempotency-Key header to retry safely: a repeated key returns the stored execution without running the decision again.

Required service-token scope: execution:write. End-user access is checked against workspace policies. Send a Bearer token and the X-Workspace-Id header.

curl --request POST \
  --url https://api.test.neobits.ai/logic/v1/019991b1-0000-7000-8000-000000000002/decisions/019991b1-0000-7000-8000-000000000003/executions \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'Idempotency-Key: 7f9c2ba4-e88f-4f2e-9b1d-1f3c6a0e5d21' \
  --header 'X-Workspace-Id: 019991b1-0000-7000-8000-000000000001' \
  --header 'Content-Type: application/json' \
  --data '{"fact":{"age":25}}'

Request

Headers

  • Authorization•string

    Bearer token authentication using OAuth 2.0 client credentials flow.

  • X-Workspace-Id•string<uuid>

    Active workspace UUID. The authenticated principal must have access to this workspace.

  • Idempotency-Key•string

    Client-chosen key, such as a UUID, that makes a retry safe. A repeated key returns the stored 201 response without running the request again. Reusing a key with a different request returns 409. A non-2xx response does not store the key.

Params (path)

  • environmentId•string<uuid>

    Environment containing the deployment.

  • decisionId•string<uuid>

    Standalone decision to execute.

Body

  • fact•object

    Input facts expected by your decision. The example assumes a decision accepting age and returning eligible; replace it with your own input.

    Response

    Headers

    • Content-Type•string

      The content type of the response.

    Body

    • id•string<uuid>

      Persisted execution identifier.

    • decisionId•string<uuid>

      Executed decision.

    • status•string

      Check this field even when the HTTP status is 201.

    • result•object

      Decision-specific output. When status is FAILED, contains an error property describing the failure.

      • performance•string

        Engine-reported duration.

      • trace•object

        Diagnostic trace for a failed execution, when available. Omitted for successful executions.

        • createdAt•string<date-time>

          Creation time.

        • updatedAt•string<date-time>

          Last update time.