Automations

List automations

List automations for a program.

get/v1/programs/{program_id}/automations

Request

  • Base URL: https://api.scrip.dev
  • URL: https://api.scrip.dev/v1/programs/{program_id}/automations
  • Auth: HTTP bearer

Path parameters

program_idstring uuid required

The program's id.

Query parameters

trigger'CRON' | 'ONE_TIME' | 'PARTICIPANT_STATE'

Return only automations with this trigger type

scope'PROGRAM' | 'PARTICIPANTS'

Return only automations with this scope

status'ACTIVE' | 'PAUSED' | 'COMPLETED' | 'FAILED' | 'ARCHIVED'

Return only automations with this status

source'API' | 'RULE_ACTION' | 'SYSTEM'

Return only automations created this way

searchstring

Search by automation name (partial match)

limitinteger

Return at most this many records, from 1 to 200, default 50.

cursorstring

The next_cursor from the previous response, valid only with the same endpoint and filters.

created_afterstring date-time

Return only records created after this time, RFC 3339.

created_beforestring date-time

Return only records created before this time, RFC 3339.

Response

Paginated automations

Example response

{
  "data": [
    {
      "created_at": "2027-01-15T10:30:00Z",
      "description": "Sends a weekly reminder event to VIP participants",
      "error_message": "participant not found",
      "execution_completed_at": "2027-01-15T10:30:00Z",
      "execution_error": "fanout aborted: program is archived",
      "execution_started_at": "2027-01-15T10:30:00Z",
      "execution_status": "COMPLETED",
      "filter_hints": [
        {
          "type": "HAS_TAG",
          "value": "vip"
        }
      ],
      "guard_condition": "participant.counter.purchases >= 1",
      "id": "6b2d4f81-0e93-4c5a-b7d6-3a8c1e5f9b13",
      "last_error": "failed to enqueue event: queue unavailable",
      "last_evaluated_at": "2027-01-15T10:30:00Z",
      "last_run_at": "2027-01-15T10:30:00Z",
      "name": "Weekly points reminder",
      "next_run_at": "2027-12-31T23:59:59Z",
      "participant_filter": "participant.tags.exists(t, t == 'vip')",
      "participant_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006",
      "participants_processed": 150,
      "participants_total": 150,
      "processed_at": "2027-01-15T10:30:00Z",
      "program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
      "scope": "PARTICIPANTS",
      "source": "API",
      "source_event_id": "e5dc1b6a-7f3d-4e2a-8c1b-9a0f4d7e6c05",
      "source_rule_id": "c9f0f895-fb98-4b39-9f86-1e5a0d3e2b03",
      "status": "ACTIVE",
      "trigger": {
        "cron_expression": "0 9 * * 1",
        "timezone": "America/Chicago",
        "type": "CRON"
      },
      "updated_at": "2027-01-15T10:30:00Z",
      "warnings": [
        {
          "code": "unknown_state_key",
          "key": "purchaseCnt",
          "kind": "counter",
          "message": "unknown counter \"purchaseCnt\" on participant: no rule in this program writes it; did you mean \"purchase_count\"?",
          "scope": "participant",
          "suggestion": "purchase_count"
        }
      ]
    }
  ],
  "pagination": {
    "has_more": true,
    "next_cursor": "YWJjMTIz"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.