---
title: "Fetch current execution state (credentials always redacted)"
method: GET
path: "/v1/executions/{id}"
---

# Fetch current execution state (credentials always redacted)

`GET /v1/executions/{id}`

## Request

- Base URL: `https://api.klanexai.com`
- URL: `https://api.klanexai.com/v1/executions/{id}`
- Auth: API key in header `X-API-Key`

## Path parameters

- `id` string, required

## Response `200`

Current state.

- Execution
  - `execution_id` string
  - `status` 'PENDING_APPROVAL' | 'QUEUED' | 'RUNNING' | 'RETRYING' | 'SUCCEEDED' | 'FAILED'
  - `attempts` integer
  - `max_attempts` integer
  - `target` Target
    - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
    - `url` string, uri, required: Absolute http(s) URL of the third-party API.
    - `headers` object: Your third-party credentials. Encrypted at rest; values are REDACTED in all reads.
    - `connection_id` string: Reference a vault connection; its managed token is injected at execution time instead of passing credentials in headers.
    - `timeout_ms` integer: Per-attempt timeout.
  - `callback_url` string
  - `result` ExecutionResult
    - `status_code` integer
    - `body` string: Target response body, truncated to 64 KiB.
  - `error` ExecError
    - `code` 'SCHEMA_INVALID' | 'TARGET_TIMEOUT' | 'TARGET_RATE_LIMITED' | 'TARGET_UNAVAILABLE' | 'TARGET_REJECTED' | 'CIRCUIT_OPEN' | 'ATTEMPTS_EXHAUSTED' | 'APPROVAL_REJECTED' | 'CONNECTION_UNAUTHORIZED' | 'INTERNAL'
    - `message` string
    - `llm_hint` string: Paste into the agent's context for self-correction.
  - `replay_of` string
  - `requires_approval` boolean
  - `approval` Approval
    - `decision` 'approved' | 'rejected'
    - `reason` string
    - `decided_at` string, date-time
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `expires_at` string, date-time: When the execution becomes eligible for deletion — submission time plus the plan's retention window (Free 7 days, Starter 30, Pro 90).

## Other responses

- `401`: Missing or invalid X-API-Key.
- `404`: No such execution for this tenant.
- `429`: Per-tenant rate limit exceeded; retry after Retry-After seconds.

---

[API](https://skmtc.dev/klanexai/apis/klanex-api.md) · [All operations](https://skmtc.dev/klanexai/apis/klanex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/klanexai/apis/klanex-api/revisions/daf36597612f?raw)
