Skip to main content

Get Flow

Retrieve metadata for a specific ActionFlow via the REST API. Includes the response fields returned and request examples.

Get Flow

Retrieve metadata for a specific ActionFlow (id, name, slug, active, organization, timestamps, and related flags). The response does not include the flow graph (data / nodes / edges). Design and edit graphs in the ActionFlows app.

Endpoint

GET /api/actionflows/{actionFlowId}

Try it

Live requests run from your browser. Open the API Explorer to try every operation from one screen.

get/api/actionflows/{actionFlowId}

Get flow

Requests go to the live API from your browser. The docs server never sees this key.

curl -X GET 'https://api.actionflows.ai/api/actionflows/{actionFlowId}' \
  -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

ParameterTypeRequiredDescription
flowIdstringYesThe unique identifier of the flow

Response

Success Response (200 OK)

{
  "success": true,
  "data": {
    "id": "flow_123",
    "name": "Customer Support Flow",
    "slug": "customer-support-flow",
    "organizationId": "org_123",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-01T00:00:00.000Z"
  }
}

Error Responses

400 Bad Request

{
  "success": false,
  "error": "Invalid flow ID"
}

401 Unauthorized

{
  "success": false,
  "error": "Unauthorized",
  "message": "Authentication required"
}

403 Forbidden

{
  "success": false,
  "error": "Unauthorized",
  "message": "Organization access denied"
}

This occurs when you try to access a flow from an organization you don't have permission to view.

404 Not Found

{
  "success": false,
  "error": "Flow not found"
}

Example Requests

cURL

curl -X GET https://api.actionflows.ai/api/actionflows/flow_123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

JavaScript

const flowId = 'flow_123';

const response = await fetch(`https://api.actionflows.ai/api/actionflows/${actionFlowId}`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();

if (data.success) {
  console.log('Flow:', data.data);
  console.log('Flow name:', data.data.name);
  console.log('Organization:', data.data.organizationId);
} else {
  console.error('Error:', data.error);
  
  if (response.status === 404) {
    console.error('Flow not found');
  } else if (response.status === 403) {
    console.error('Access denied to this flow');
  }
}

Python

import requests

headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
}

flow_id = 'flow_123'
response = requests.get(
    f'https://api.actionflows.ai/api/actionflows/{flow_id}',
    headers=headers
)

data = response.json()

if data['success']:
    flow = data['data']
    print(f"Flow: {flow['name']}")
    print(f"Slug: {flow['slug']}")
    print(f"Organization: {flow['organizationId']}")
else:
    print(f"Error: {data['error']}")
    
    if response.status_code == 404:
        print("Flow not found")
    elif response.status_code == 403:
        print("Access denied to this flow")

Response Fields

FieldTypeDescription
idstringUnique flow identifier
namestringFlow name
slugstring | nullURL-friendly flow identifier
organizationIdstringOrganization ID that owns the flow
createdAtstring (ISO 8601)Flow creation timestamp
updatedAtstring (ISO 8601) | nullLast update timestamp

Notes

  • You must have access to the organization that owns the flow
  • Deleted flows return a 404 error (deleted flows are filtered out)
  • The endpoint returns flow metadata, not the full node/edge graph: build and edit the graph in Actionflow Studio

On this page