Create an automation
Create a scheduled or event-driven automation within a program.
Creates an automation scoped to a program. At minimum you must provideDocumentation Index
Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt
Use this file to discover all available pages before exploring further.
name, trigger.type, scope, and event_name. The trigger.type can be cron, one_time, immediate, or participant_state. The scope determines whether the automation fires once at the program level or fans out across individual participants.
Not all trigger and scope combinations are valid. The immediate and participant_state trigger types only support participants scope. If you specify an invalid combination, the request will be rejected with a validation error.
For one_time automations with scope set to program, you can optionally include participant_id to target a specific participant. This sends the event to that participant rather than to the program at large.
When the automation fires, it generates an event with the specified event_name and optional payload. That event enters the rules engine like any other event, so you can attach rule logic to it without additional wiring.
Authorizations
API key passed in the X-API-Key header.
Path Parameters
Program ID
Body
Automation configuration
The event name generated when this automation fires (1-255 chars)
1 - 255Human-readable label for this automation (1-255 chars)
1 - 255Whether the automation fires once at the program level or fans out per participant: program or participants
program, participants Trigger configuration (type, schedule, timing)
Optional human-readable description of what this automation does
Optimization hints for the participant filter (e.g., has_tag, has_attribute, has_counter)
CEL expression evaluated at trigger time; skips the participant if false
CEL expression that determines which participants are enrolled (scope=participants only)
Target participant for program-scoped one-time automations (scope=program, one_time trigger only)
Custom data included in the generated event
Response
Automation created
When this automation was created
Cron expression defining the recurring schedule (cron trigger only)
Optional human-readable description of what this automation does
Error message if the one-time automation failed
The event name generated when this automation fires
When the current fan-out execution completed
Error message if the fan-out execution failed
When the current fan-out execution started
Current fan-out execution state: idle, pending, executing, completed, or failed (participant-scoped only)
Optimization hints for the participant filter (e.g., has_tag, has_attribute, has_counter)
CEL expression evaluated at trigger time; skips the participant if false
Unique identifier for this automation
Error message from the most recent cron execution, if any (cron trigger only)
When participant filters were last evaluated (participant_state trigger only)
When this automation last fired (cron trigger only)
Human-readable label for this automation
When this automation will next fire (cron trigger only)
CEL expression that determines which participants are enrolled
Target participant for program-scoped one-time automations
Participants processed so far in the current fan-out run
Total participants to process in the current fan-out run
Custom data included in the generated event
When this one-time automation was processed
The program this automation belongs to
Configuration for the schedule type (participant_state trigger only)
How participant subscriptions are scheduled: ATTRIBUTE_DATE, INTERVAL, CRON, or THRESHOLD (participant_state trigger only)
Whether the automation fires once at the program level or fans out per participant: program or participants
How this automation was created: api or rule_action
Current state: active, paused, completed, failed, or archived
IANA timezone used for scheduling (e.g., America/New_York)
When this automation is scheduled to fire (one_time trigger only, RFC 3339)
How this automation is triggered: cron, one_time, participant_state, or immediate
When this automation was last updated