> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.athenaintel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.athenaintel.com/_mcp/server.

# Get automation run

GET https://api.athenaintel.com/api/v0/automations/runs/{run_id}

Read one run and every step attempt recorded for it, in execution order: status, timings, cost, the session a step opened, the approval it waits on, and its error. The run's inputs and events and each step's input, output, session, approval and error message are returned only to the run's subject (who started it, or the owner of the trigger that did) and its participants (its approvers); for everyone else they are null, and a step's error keeps its code.

Reference: https://docs.athenaintel.com/api-reference/automations/get-run

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Path parameters

- `run_id` (string, required) — Unique identifier of the run

## Response

### 200

The run and its steps

- `run` (AutomationRunOut, required) — One run of an automation.
- `steps` (list of AutomationRunStepOut, required)

## Errors

### 403 Forbidden Error

The Automations gate denied, or no access to the asset

- `detail` (AutomationsDenialDetailOut, required) — ``detail`` of the 403 the Automations gate returns.

### 404 Not Found Error

Run not found

- `message` (string, required)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### AutomationRunOut

One run of an automation.

- `automation_asset_id` (string, required)
- `cost_usd` (double, required, nullable) — Model spend in USD. Null unless the caller is Athena staff or an owner or manager of the automation's workspace. Which side of the workspace's LLM cost multiplier depends on the step: a step that runs a conversation counts that conversation's cost, multiplier included; a step that calls a model itself (a judge) counts those calls at the provider's rate. A run's total adds its steps, so it can mix the two. See docs/SESSION_TOKEN_USAGE_AND_TOKEN_COST_GUIDE.md#which-cost-field-do-i-sum.
- `created_at` (datetime, required)
- `ended_at` (datetime, required, nullable)
- `event_ids` (list of string, required)
- `failure_reason` (string, required, nullable)
- `fingerprint` (string, required)
- `inngest_run_id` (string, required, nullable)
- `inputs` (map from string to any, required, nullable)
- `principal_ref` (string, required)
- `project_asset_id` (string, required, nullable)
- `run_id` (string, required)
- `run_status` (string, required) — scheduled | queued | running | needs_input | completed | failed | canceled
- `started_at` (datetime, required, nullable)
- `status_v2` (map from string to any, required) — The canonical status_v2 projection of the run
- `tokens` (integer, required, nullable) — Tokens used. Null unless the caller is Athena staff or an owner or manager of the automation's workspace.
- `trigger_execution_id` (string, required, nullable)
- `trigger_id` (string, required, nullable)
- `trigger_kind` (string, required) — manual | schedule | table_change | run_completed | event | call_automation | redrive
- `updated_at` (datetime, required)
- `version_id` (string, required)
- `workspace_id` (string, required)
- `mode` (enum, optional, default: live) — live, or dry_run for a rehearsal whose writing effects were captured
  - Allowed values: `live`, `dry_run`
- `outcome` (enum, optional, nullable) — success | skipped | failure | canceled — how the run ended, refining its status (`skipped` is a completed run whose `end` step said so); null until it ends
  - Allowed values: `success`, `skipped`, `failure`, `canceled`
- `scheduled_for` (datetime, optional, nullable) — When a `scheduled` run was created for (quiet hours defer a fire to the window's end); null for a run queued at once

### AutomationRunStepOut

One step attempt of a run.

- `approval_id` (string, required, nullable)
- `attempt` (integer, required)
- `cost_usd` (double, required, nullable) — Model spend in USD. Null unless the caller is Athena staff or an owner or manager of the automation's workspace. Which side of the workspace's LLM cost multiplier depends on the step: a step that runs a conversation counts that conversation's cost, multiplier included; a step that calls a model itself (a judge) counts those calls at the provider's rate. A run's total adds its steps, so it can mix the two. See docs/SESSION_TOKEN_USAGE_AND_TOKEN_COST_GUIDE.md#which-cost-field-do-i-sum.
- `created_at` (datetime, required)
- `ended_at` (datetime, required, nullable)
- `error` (map from string to any, required, nullable)
- `input` (map from string to any, required, nullable)
- `kind` (string, required)
- `output` (map from string to any, required, nullable)
- `output_ref` (string, required, nullable)
- `session_thread_id` (string, required, nullable)
- `started_at` (datetime, required, nullable)
- `status` (string, required)
- `step_id` (string, required)
- `tokens` (integer, required, nullable) — Tokens used. Null unless the caller is Athena staff or an owner or manager of the automation's workspace.

### AutomationsDenialDetailOut

``detail`` of the 403 the Automations gate returns.

- `hint` (string, required) — The next step that lifts the denial
- `message` (string, required) — Human-readable denial
- `reason` (enum, required) — Which of the gate's three checks failed: the deployment has Automations off, the caller is not a member of the workspace, or the workspace is not enrolled
  - Allowed values: `not_provisioned`, `not_permitted`, `workspace_not_enrolled`
- `code` ("AUTOMATIONS_UNAVAILABLE", optional, default: AUTOMATIONS_UNAVAILABLE) — Stable code for a denial by the Automations gate

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "run": {
    "automation_asset_id": "string",
    "cost_usd": 1.1,
    "created_at": "2024-01-15T09:30:00Z",
    "ended_at": "2024-01-15T09:30:00Z",
    "event_ids": [
      "string"
    ],
    "failure_reason": "string",
    "fingerprint": "string",
    "inngest_run_id": "string",
    "inputs": {},
    "principal_ref": "string",
    "project_asset_id": "string",
    "run_id": "string",
    "run_status": "string",
    "started_at": "2024-01-15T09:30:00Z",
    "status_v2": {},
    "tokens": 1,
    "trigger_execution_id": "string",
    "trigger_id": "string",
    "trigger_kind": "string",
    "updated_at": "2024-01-15T09:30:00Z",
    "version_id": "string",
    "workspace_id": "string",
    "mode": "live",
    "outcome": "success",
    "scheduled_for": "2024-01-15T09:30:00Z"
  },
  "steps": [
    {
      "approval_id": "string",
      "attempt": 1,
      "cost_usd": 1.1,
      "created_at": "2024-01-15T09:30:00Z",
      "ended_at": "2024-01-15T09:30:00Z",
      "error": {},
      "input": {},
      "kind": "string",
      "output": {},
      "output_ref": "string",
      "session_thread_id": "string",
      "started_at": "2024-01-15T09:30:00Z",
      "status": "string",
      "step_id": "string",
      "tokens": 1
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/automations/runs/run_id"

headers = {"X-API-KEY": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.athenaintel.com/api/v0/automations/runs/run_id';
const options = {method: 'GET', headers: {'X-API-KEY': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.athenaintel.com/api/v0/automations/runs/run_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-KEY", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.athenaintel.com/api/v0/automations/runs/run_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.athenaintel.com/api/v0/automations/runs/run_id")
  .header("X-API-KEY", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.athenaintel.com/api/v0/automations/runs/run_id', [
  'headers' => [
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/automations/runs/run_id");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-KEY", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-KEY": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/automations/runs/run_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```