List automation subscriptions
curl --request GET \
--url https://api.scrip.dev/v1/programs/{programId}/automations/{automationId}/subscriptions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/programs/{programId}/automations/{automationId}/subscriptions"
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/{automationId}/subscriptions', 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/{automationId}/subscriptions",
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/{automationId}/subscriptions"
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/{automationId}/subscriptions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/programs/{programId}/automations/{automationId}/subscriptions")
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": [
{
"automation_id": "990e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-15T10:30:00Z",
"id": "990e8400-e29b-41d4-a716-446655440001",
"last_error": "failed to enqueue event: queue unavailable",
"last_triggered_at": "2024-01-15T09:00:00Z",
"next_trigger_at": "2024-01-22T09:00:00Z",
"participant_id": "550e8400-e29b-41d4-a716-446655440001",
"retry_count": 0,
"status": "active",
"trigger_count": 12
}
],
"pagination": {
"has_more": true,
"next_cursor": "YWJjMTIz"
}
}{
"code": "unauthorized",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Automations
List automation subscriptions
Returns per-participant subscription records for a participant-scoped automation.
GET
/
v1
/
programs
/
{programId}
/
automations
/
{automationId}
/
subscriptions
List automation subscriptions
curl --request GET \
--url https://api.scrip.dev/v1/programs/{programId}/automations/{automationId}/subscriptions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/programs/{programId}/automations/{automationId}/subscriptions"
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/{automationId}/subscriptions', 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/{automationId}/subscriptions",
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/{automationId}/subscriptions"
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/{automationId}/subscriptions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/programs/{programId}/automations/{automationId}/subscriptions")
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": [
{
"automation_id": "990e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-15T10:30:00Z",
"id": "990e8400-e29b-41d4-a716-446655440001",
"last_error": "failed to enqueue event: queue unavailable",
"last_triggered_at": "2024-01-15T09:00:00Z",
"next_trigger_at": "2024-01-22T09:00:00Z",
"participant_id": "550e8400-e29b-41d4-a716-446655440001",
"retry_count": 0,
"status": "active",
"trigger_count": 12
}
],
"pagination": {
"has_more": true,
"next_cursor": "YWJjMTIz"
}
}{
"code": "unauthorized",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Lists the per-participant subscriptions for a
participant_state automation. Each subscription shows the participant, next_trigger_at, and current status. Results are paginated.
This endpoint only applies to automations with trigger.type set to participant_state. Calling it on a cron, one_time, or immediate automation returns an empty list. Use this to inspect which participants are currently enrolled and when their next event will fire.
For usage patterns and examples, see the Automations guide.
Authorizations
ApiKeyAuthBearerAuth
API key passed in the X-API-Key header.
Path Parameters
Program ID
Automation ID
Query Parameters
Filter by subscription status
Available options:
active, completed, failed ⌘I