Get Run
Retrieve detailed information about a specific ActionFlows run via the REST API, including its status, timing, and results.
Get Run
Retrieve detailed information about a specific run.
Endpoint
GET /api/runs/{runId}Try it
Live requests run from your browser. Open the API Explorer to try every operation from one screen.
/api/runs/{runId}Get run
Requests go to the live API from your browser. The docs server never sees this key.
curl -X GET 'https://api.actionflows.ai/api/runs/{runId}' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Accept: application/json'Response
Send a request to see the response.
Authentication
Required. See API Reference for authentication details.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
runId | string | Yes | The unique identifier of the run (must start with run_) |
Response
Success Response (200 OK)
{
"success": true,
"data": {
"id": "run_123",
"status": "COMPLETED",
"taskIdentifier": "run-flow",
"version": "1.0.0",
"payload": {
"organizationId": "org_123",
"actionFlowId": "flow_123",
"data": {
"customerEmail": "[email protected]"
}
},
"output": {
"result": "Flow completed successfully"
},
"tags": ["production"],
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:05:00.000Z",
"startedAt": "2024-01-01T00:00:01.000Z",
"completedAt": "2024-01-01T00:05:00.000Z",
"duration": 299
}
}Error Responses
400 Bad Request
{
"success": false,
"error": "Invalid run ID"
}This occurs when the run ID doesn't start with run_.
401 Unauthorized
{
"success": false,
"error": "Unauthorized",
"message": "Authentication required"
}404 Not Found
{
"success": false,
"error": "Run not found"
}429 Too Many Requests
{
"error": "Too many requests"
}Example Requests
cURL
curl -X GET https://api.actionflows.ai/api/runs/run_123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"JavaScript
const runId = 'run_123';
const response = await fetch(`https://api.actionflows.ai/api/runs/${runId}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const data = await response.json();
if (data.success) {
const run = data.data;
console.log('Run ID:', run.id);
console.log('Status:', run.status);
console.log('Duration:', run.duration, 'seconds');
if (run.status === 'COMPLETED') {
console.log('Output:', run.output);
} else if (run.status === 'FAILED') {
console.error('Run failed');
}
} else {
console.error('Error:', data.error);
if (response.status === 404) {
console.error('Run not found');
}
}Python
import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
}
run_id = 'run_123'
response = requests.get(
f'https://api.actionflows.ai/api/runs/{run_id}',
headers=headers
)
data = response.json()
if data['success']:
run = data['data']
print(f"Run ID: {run['id']}")
print(f"Status: {run['status']}")
print(f"Duration: {run.get('duration', 'N/A')} seconds")
if run['status'] == 'COMPLETED':
print(f"Output: {run.get('output', {})}")
elif run['status'] == 'FAILED':
print("Run failed")
else:
print(f"Error: {data['error']}")
if response.status_code == 404:
print("Run not found")Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique run identifier (starts with run_) |
status | string | Run status |
taskIdentifier | string | Task identifier |
version | string | Run version |
payload | object | Original run payload |
payload.organizationId | string | Organization ID |
payload.actionFlowId | string | Flow ID |
payload.data | object | Custom data passed to the flow |
output | object | Run output (if completed) |
tags | array | Run tags |
createdAt | string (ISO 8601) | Run creation timestamp |
updatedAt | string (ISO 8601) | Last update timestamp |
startedAt | string (ISO 8601) | Run start timestamp |
completedAt | string (ISO 8601) | Run completion timestamp (if completed) |
duration | number | Run duration in seconds (if completed) |
Run Status Values
COMPLETED- Run finished successfullyFAILED- Run failed with an errorCANCELED- Run was canceledCRASHED- Run crashed unexpectedlyTIMED_OUT- Run exceeded time limitWAITING- Run is waiting to startEXECUTING- Run is currently executingPAUSED- Run is paused
Notes
- Run IDs must start with
run_ - The
outputfield is only available for completed runs - The
durationfield is only available for completed runs - Use the Stream Run endpoint for real-time updates
- This endpoint is rate-limited per user
List Runs
List all ActionFlows runs across your flows via the REST API, with optional filtering and pagination. Includes request parameters and response schema.
Trigger Run
Start a new ActionFlows flow execution via the REST API by triggering a run with a payload. Includes request body, options, and response schema.