> 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.

# Run automation

POST https://api.athenaintel.com/api/v0/automations/{asset_id}/run
Content-Type: application/json

Start a manual run of the automation's current version and queue it; returns the run id to poll with GET /automations/runs/\{run\_id}. The inputs are validated against the version's `inputs` schema with declared defaults filled in; a refusal is 400 with `detail.code = INVALID_RUN_INPUTS`, `detail.issues[]` naming each problem's `path` and `message`, and `detail.subject` = `inputs` (fix the request body) or `schema` (the version's pinned schema is invalid; republish the automation). Also refused with 400 when the automation has no published version, is archived, or automation runs are switched off for the deployment. Send an `Idempotency-Key` header to make the launch safe to retry: repeating the identical request with the same key replays the original response (deduplicated: true) instead of queuing a second run; the same key with different parameters is rejected with 422.

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

## Authentication

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

## Request

### Path parameters

- `asset_id` (string, required) — Unique identifier of the automation asset

### Headers

- `Idempotency-Key` (string, optional, nullable) — Caller-chosen key that makes the launch safe to retry. A repeated request with the same key and parameters replays the first response instead of queuing another run.

### Body (application/json)

This endpoint expects an AutomationRunRequestIn.

- `inputs` (map from string to any, optional, nullable) — Run inputs, readable by steps as `inputs.<name>`

## Response

### 200

Run queued (or replayed for a repeated key)

- `automation_asset_id` (string, required)
- `fingerprint` (string, required)
- `run_id` (string, required)
- `version_id` (string, required)
- `deduplicated` (boolean, optional, default: false) — True when this response replays the run an earlier request with the same Idempotency-Key already queued; no second run was created
- `mode` (enum, optional, default: live) — live, or dry_run for a rehearsal
  - Allowed values: `live`, `dry_run`
- `run_status` (string, optional, default: queued)

## Errors

### 400 Bad Request Error

Not published, archived, runs switched off, or inputs the `inputs` schema refuses (`detail.code = INVALID_RUN_INPUTS`)

- `map from string to any`

### 403 Forbidden Error

The Automations gate denied, or no edit permission

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

### 404 Not Found Error

Not found, or not an automation

- `message` (string, required)

### 409 Conflict Error

A request with this Idempotency-Key is still being processed

- `map from string to any`

### 422 Unprocessable Entity Error

This Idempotency-Key was already used with different parameters

- `detail` (list of ValidationError, optional)

## Types

### 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

**Request**

```json
{
  "inputs": {
    "since": "2026-09-21T00:00:00Z"
  }
}
```

**Response**

```json
{
  "automation_asset_id": "asset_92492920-d118-42d3-95b4-00eccfe0754f",
  "fingerprint": "sha256:6f1a…",
  "run_id": "arun_7f3b2c1d9e8a4b5c",
  "version_id": "apv_1",
  "mode": "live",
  "run_status": "queued"
}
```

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/automations/asset_id/run"

payload = { "inputs": { "since": "2026-09-21T00:00:00Z" } }
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.athenaintel.com/api/v0/automations/asset_id/run';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"inputs":{"since":"2026-09-21T00:00:00Z"}}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.athenaintel.com/api/v0/automations/asset_id/run"

	payload := strings.NewReader("{\n  \"inputs\": {\n    \"since\": \"2026-09-21T00:00:00Z\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	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/asset_id/run")

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

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"inputs\": {\n    \"since\": \"2026-09-21T00:00:00Z\"\n  }\n}"

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.post("https://api.athenaintel.com/api/v0/automations/asset_id/run")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"inputs\": {\n    \"since\": \"2026-09-21T00:00:00Z\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.athenaintel.com/api/v0/automations/asset_id/run', [
  'body' => '{
  "inputs": {
    "since": "2026-09-21T00:00:00Z"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/automations/asset_id/run");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": {\n    \"since\": \"2026-09-21T00:00:00Z\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["inputs": ["since": "2026-09-21T00:00:00Z"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/automations/asset_id/run")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```