Skip to main content
GET
/
v1
/
programs
/
{programId}
/
automations
/
{automationId}
Get an automation
curl --request GET \
  --url https://api.scrip.dev/v1/programs/{programId}/automations/{automationId} \
  --header 'X-API-Key: <api-key>'
{
  "created_at": "2023-11-07T05:31:56Z",
  "cron_expression": "<string>",
  "description": "<string>",
  "error_message": "<string>",
  "event_name": "<string>",
  "execution_completed_at": "2023-11-07T05:31:56Z",
  "execution_error": "<string>",
  "execution_started_at": "2023-11-07T05:31:56Z",
  "execution_status": "<string>",
  "filter_hints": [
    {}
  ],
  "guard_condition": "<string>",
  "id": "<string>",
  "last_error": "<string>",
  "last_evaluated_at": "2023-11-07T05:31:56Z",
  "last_run_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "next_run_at": "2023-11-07T05:31:56Z",
  "participant_filter": "<string>",
  "participant_id": "<string>",
  "participants_processed": 123,
  "participants_total": 123,
  "payload": {},
  "processed_at": "2023-11-07T05:31:56Z",
  "program_id": "<string>",
  "schedule_config": {},
  "schedule_type": "<string>",
  "scope": "<string>",
  "source": "<string>",
  "status": "<string>",
  "timezone": "<string>",
  "trigger_at": "2023-11-07T05:31:56Z",
  "trigger_type": "<string>",
  "updated_at": "2023-11-07T05:31:56Z"
}
Returns a single automation by ID, including its full configuration and current execution state. For participant-scoped automations, the response includes fan-out progress fields: participants_total and participants_processed. These let you track how far along a running automation is. For program-scoped automations, these fields are omitted.
For usage patterns and examples, see the Automations guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Path Parameters

programId
string<uuid>
required

Program ID

automationId
string<uuid>
required

Automation ID

Response

Automation details

created_at
string<date-time>

When this automation was created

cron_expression
string

Cron expression defining the recurring schedule (cron trigger only)

description
string

Optional human-readable description of what this automation does

error_message
string

Error message if the one-time automation failed

event_name
string

The event name generated when this automation fires

execution_completed_at
string<date-time>

When the current fan-out execution completed

execution_error
string

Error message if the fan-out execution failed

execution_started_at
string<date-time>

When the current fan-out execution started

execution_status
string

Current fan-out execution state: idle, pending, executing, completed, or failed (participant-scoped only)

filter_hints
object[]

Optimization hints for the participant filter (e.g., has_tag, has_attribute)

guard_condition
string

CEL expression evaluated at trigger time; skips the participant if false

id
string

Unique identifier for this automation

last_error
string

Error message from the most recent cron execution, if any (cron trigger only)

last_evaluated_at
string<date-time>

When participant filters were last evaluated (participant_state trigger only)

last_run_at
string<date-time>

When this automation last fired (cron trigger only)

name
string

Human-readable label for this automation

next_run_at
string<date-time>

When this automation will next fire (cron trigger only)

participant_filter
string

CEL expression that determines which participants are enrolled

participant_id
string

Target participant for program-scoped one-time automations

participants_processed
integer

Participants processed so far in the current fan-out run

participants_total
integer

Total participants to process in the current fan-out run

payload
object

Custom data included in the generated event

processed_at
string<date-time>

When this one-time automation was processed

program_id
string

The program this automation belongs to

schedule_config
object

Configuration for the schedule type (participant_state trigger only)

schedule_type
string

How participant subscriptions are scheduled: ATTRIBUTE_DATE, INTERVAL, CRON, or THRESHOLD (participant_state trigger only)

scope
string

Whether the automation fires once at the program level or fans out per participant: program or participants

source
string

How this automation was created: api or rule_action

status
string

Current state: active, paused, completed, failed, or archived

timezone
string

IANA timezone used for scheduling (e.g., America/New_York)

trigger_at
string<date-time>

When this automation is scheduled to fire (one_time trigger only, RFC 3339)

trigger_type
string

How this automation is triggered: cron, one_time, participant_state, or immediate

updated_at
string<date-time>

When this automation was last updated