List automations
curl --request GET \
--url https://api.scrip.dev/v1/programs/{programId}/automations \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/programs/{programId}/automations"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/programs/{programId}/automations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/programs/{programId}/automations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/programs/{programId}/automations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrip.dev/v1/programs/{programId}/automations")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/programs/{programId}/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"created_at": "2024-01-15T10:30:00Z",
"description": "Sends a weekly reminder event to VIP participants",
"error_message": "participant not found",
"event_data": {},
"execution_completed_at": "2024-01-15T09:00:42Z",
"execution_error": "fanout aborted: program is archived",
"execution_started_at": "2024-01-15T09:00:00Z",
"execution_status": "completed",
"filter_hints": [
{
"type": "has_tag",
"value": "vip"
}
],
"guard_condition": "participant.counters.purchases >= 1",
"id": "990e8400-e29b-41d4-a716-446655440000",
"last_error": "failed to enqueue event: queue unavailable",
"last_evaluated_at": "2024-01-15T10:30:00Z",
"last_run_at": "2024-01-15T09:00:00Z",
"name": "Weekly points reminder",
"next_run_at": "2024-01-22T09:00:00Z",
"participant_filter": "participant.tags.exists(t, t == 'vip')",
"participant_id": "550e8400-e29b-41d4-a716-446655440001",
"participants_processed": 150,
"participants_skipped_error": 0,
"participants_total": 150,
"processed_at": "2024-02-01T09:00:05Z",
"program_id": "550e8400-e29b-41d4-a716-446655440000",
"scope": "participants",
"source": "api",
"source_event_id": "770e8400-e29b-41d4-a716-446655440000",
"source_rule_id": "880e8400-e29b-41d4-a716-446655440000",
"status": "active",
"trigger": {
"cron_expression": "0 9 * * 1",
"timezone": "America/Chicago",
"type": "cron"
},
"updated_at": "2024-01-15T10:30:00Z",
"warnings": [
{
"client_ref": "<string>",
"code": "unknown_state_key",
"key": "purchaseCnt",
"kind": "counter",
"message": "unknown counter \"purchaseCnt\" — no rule in this program writes it; did you mean \"purchase_count\"?",
"rule_id": "<string>",
"rule_set_id": "<string>",
"scope": "participant",
"suggestion": "purchase_count"
}
]
}
],
"pagination": {
"has_more": true,
"next_cursor": "YWJjMTIz"
}
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Automations
List automations
List automations for a program.
GET
/
v1
/
programs
/
{programId}
/
automations
List automations
curl --request GET \
--url https://api.scrip.dev/v1/programs/{programId}/automations \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/programs/{programId}/automations"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/programs/{programId}/automations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/programs/{programId}/automations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/programs/{programId}/automations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrip.dev/v1/programs/{programId}/automations")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/programs/{programId}/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"created_at": "2024-01-15T10:30:00Z",
"description": "Sends a weekly reminder event to VIP participants",
"error_message": "participant not found",
"event_data": {},
"execution_completed_at": "2024-01-15T09:00:42Z",
"execution_error": "fanout aborted: program is archived",
"execution_started_at": "2024-01-15T09:00:00Z",
"execution_status": "completed",
"filter_hints": [
{
"type": "has_tag",
"value": "vip"
}
],
"guard_condition": "participant.counters.purchases >= 1",
"id": "990e8400-e29b-41d4-a716-446655440000",
"last_error": "failed to enqueue event: queue unavailable",
"last_evaluated_at": "2024-01-15T10:30:00Z",
"last_run_at": "2024-01-15T09:00:00Z",
"name": "Weekly points reminder",
"next_run_at": "2024-01-22T09:00:00Z",
"participant_filter": "participant.tags.exists(t, t == 'vip')",
"participant_id": "550e8400-e29b-41d4-a716-446655440001",
"participants_processed": 150,
"participants_skipped_error": 0,
"participants_total": 150,
"processed_at": "2024-02-01T09:00:05Z",
"program_id": "550e8400-e29b-41d4-a716-446655440000",
"scope": "participants",
"source": "api",
"source_event_id": "770e8400-e29b-41d4-a716-446655440000",
"source_rule_id": "880e8400-e29b-41d4-a716-446655440000",
"status": "active",
"trigger": {
"cron_expression": "0 9 * * 1",
"timezone": "America/Chicago",
"type": "cron"
},
"updated_at": "2024-01-15T10:30:00Z",
"warnings": [
{
"client_ref": "<string>",
"code": "unknown_state_key",
"key": "purchaseCnt",
"kind": "counter",
"message": "unknown counter \"purchaseCnt\" — no rule in this program writes it; did you mean \"purchase_count\"?",
"rule_id": "<string>",
"rule_set_id": "<string>",
"scope": "participant",
"suggestion": "purchase_count"
}
]
}
],
"pagination": {
"has_more": true,
"next_cursor": "YWJjMTIz"
}
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Lists automations for a given program. Results are paginated and returned in reverse-chronological order. Use
search to find automations by name. Without a status filter, the list excludes terminal statuses (completed, failed, archived); pass status explicitly to see them.
Filter by trigger (the trigger.type), scope, status, and source. The source filter distinguishes automations created through the API (api), by a SCHEDULE_EVENT or BROADCAST rule action (rule_action), and by Scrip for tasks such as tier expiration (system). The default list returns api and rule_action rows only; pass source=system to see system rows. When you combine filters, results must match all of them.
For usage patterns and examples, see the Automations guide.
Authorizations
ApiKeyAuthBearerAuth
API key passed in the X-API-Key header.
Path Parameters
Program ID
Query Parameters
Filter by trigger.type
Available options:
cron, one_time, participant_state Filter by scope
Available options:
program, participants Filter by status
Available options:
active, paused, completed, failed, archived Filter by source
Available options:
api, rule_action, system Search by automation name (partial match)
Max results per page (1-200, default 50)
Required range:
x >= 1Pagination cursor from a previous response