# Executing decisions (/docs/integrate/executing)



```http
POST /api/v1/decisions/:key/execute
```

The body is a JSON object validated against the decision's input model. The response carries the
decision, the outputs, the requested actions and the reasons — see
[API quickstart](/docs/getting-started/api-quickstart) for a full example.

## Pin a version [#pin-a-version]

By default the call runs `latest` — the version deployed to the key's environment. Pin an exact
version or a tag with the query string or a header:

```
?version=latest | 3 | tag:stable
X-Decision-Version: 3
```

## Batch [#batch]

```http
POST /api/v1/decisions/:key/execute/batch
{ "items": [ { ... }, { ... } ] }
```

A batch runs every record against **one version** (resolved once, so a publish mid-batch cannot
split it), stores each record as a normal execution, and reports a failed record in place without
stopping the rest. The answer is `200` whenever the batch ran, so check `summary.failed`.
`EXECUTION_BATCH_MAX_ITEMS` (100) caps the size and `EXECUTION_BATCH_CONCURRENCY` (8) how many run
at once.

## Rate limits [#rate-limits]

Responses carry `X-RateLimit-Limit` and `X-RateLimit-Remaining`, and `Retry-After` on a `429`.
Rate limits hold **across replicas**: counters live in Redis (one atomic script per hit) with a
Postgres fallback, so several API instances share one budget. Each batch record costs one unit.

## Reading executions [#reading-executions]

The execution record and its explanation are read from the console (session):

```
GET  /api/v1/executions/:id             full record: input, output, reasons, trace, deliveries
GET  /api/v1/executions/:id/explain     the reasons, for support and auditors
POST /api/v1/tables/:key/evaluate       try a table on its own
```
