> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Execution

Use this API to fetch a workflow execution. Returns an `ExecutionView` with the current state plus the view-model of every step.

# Endpoint

`POST https://api.velt.dev/v2/workflow/executions/get`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="executionId" type="string" required>
      The execution to fetch.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

#### Get an execution

```JSON theme={null}
{
  "data": {
    "executionId": "exec_1777374504255_xzy43k9q"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "executionId": "exec_1777374504255_xzy43k9q",
    "status": "completed",
    "startedAt": 1777374504364,
    "completedAt": 1777374842347,
    "cancelledAt": null,
    "definitionId": "marketing-copy-approval",
    "definitionVersion": 1,
    "correlationId": "corr_campaign_42",
    "idempotencyKey": "campaign-42-dispatch",
    "failureReason": null,
    "steps": [
      {
        "stepId": "group_parallel-review__to__agent-publish",
        "nodeId": "agent-publish",
        "nodeType": "agent",
        "status": "completed",
        "groupId": null,
        "startedAt": 1777374841756,
        "completedAt": 1777374841986,
        "output": {
          "agentId": "publish-agent-v1",
          "summary": "...",
          "generatedAt": 1777374841939
        },
        "error": null
      }
    ]
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "NOT_FOUND"
  }
}
```

**Errors:** `NOT_FOUND` / `INVALID_ARGUMENT`.

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "executionId": "exec_1777374504255_xzy43k9q",
      "status": "completed",
      "startedAt": 1777374504364,
      "completedAt": 1777374842347,
      "cancelledAt": null,
      "definitionId": "marketing-copy-approval",
      "definitionVersion": 1,
      "correlationId": "corr_campaign_42",
      "idempotencyKey": "campaign-42-dispatch",
      "failureReason": null,
      "steps": []
    }
  }
  ```
</ResponseExample>
