Scrip · Schema

AutomationResponse

An automation: an event that Scrip sends on a schedule, with its trigger, status and run history.

RewardsLoyaltyFintechPlatform

Properties

Name Type Description
created_at string When this automation was created
description string Optional human-readable description of what this automation does
error_message string Error message if the one-time automation failed
event_data object Event data submitted when this automation fires
event_type string The name of the events this automation sends, such as `weekly_reminder`. Rules read it as `event.type`.
execution_completed_at string When the current fan-out execution completed
execution_error string Error message if the fan-out execution failed, or JSON-encoded diagnostics for completed runs with CEL eval skips
execution_started_at string When the current fan-out execution started
execution_status string Progress of the current fan-out run, separate from `status`. - IDLE: no run is in progress. - EXECUTING: sending events to matching participants. - COMPLETED: latest run finished. - FAILED: latest run
filter_hints array Checks derived from `participant_filter` that narrow the participants to consider. Scrip still evaluates the full CEL filter for each candidate.
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 When participant filters were last evaluated (PARTICIPANT_STATE trigger only)
last_run_at string When this automation last fired (cron trigger only)
name string Human-readable label for this automation
next_run_at string 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 Scrip has sent the event to in the current run so far.
participants_skipped_error integer Participants skipped because participant_filter or guard_condition CEL evaluation errored
participants_total integer Total candidate participants in the current fan-out run.
processed_at string When this one-time automation was processed
program_id string The program this automation belongs to
scope string Whether the automation sends one event to the program (PROGRAM) or one event to each matching participant (PARTICIPANTS).
source string How the automation was created. - API: created through the automations API. - RULE_ACTION: created by a SCHEDULE_EVENT or BROADCAST rule action. - SYSTEM: created by Scrip for scheduled work such as t
source_event_id string The event whose processing created this automation. Omitted when no source event is recorded, for example on automations created through the API.
source_rule_id string The rule whose action created this automation. Omitted when no rule action created it, including automations created through the API.
status string Whether the automation can fire. - ACTIVE: fires when its trigger is due. - PAUSED: does not fire until you set it back to ACTIVE. - COMPLETED: a one-time automation that has fired; it cannot fire aga
trigger object Trigger configuration (type, schedule, and timing)
updated_at string When this automation was last updated
warnings array Advisories about `participant_filter` and `guard_condition`, such as a counter, tag or attribute key that no rule in the program writes. They appear on create and update only, and they never block the
View JSON Schema on GitHub

JSON Schema

scrip-dev-automation-response-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scrip-dev/json-schema/scrip-dev-automation-response-schema.json",
  "title": "AutomationResponse",
  "description": "An automation: an event that Scrip sends on a schedule, with its trigger, status and run history.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scrip-dev-openapi.json#/components/schemas/AutomationResponse",
  "properties": {
    "created_at": {
      "description": "When this automation was created",
      "format": "date-time",
      "type": "string"
    },
    "description": {
      "description": "Optional human-readable description of what this automation does",
      "type": "string"
    },
    "error_message": {
      "description": "Error message if the one-time automation failed",
      "type": "string"
    },
    "event_data": {
      "description": "Event data submitted when this automation fires",
      "type": "object"
    },
    "event_type": {
      "description": "The name of the events this automation sends, such as `weekly_reminder`. Rules read it as `event.type`.",
      "type": "string"
    },
    "execution_completed_at": {
      "description": "When the current fan-out execution completed",
      "format": "date-time",
      "type": "string"
    },
    "execution_error": {
      "description": "Error message if the fan-out execution failed, or JSON-encoded diagnostics for completed runs with CEL eval skips",
      "type": "string"
    },
    "execution_started_at": {
      "description": "When the current fan-out execution started",
      "format": "date-time",
      "type": "string"
    },
    "execution_status": {
      "description": "Progress of the current fan-out run, separate from `status`.\n- IDLE: no run is in progress.\n- EXECUTING: sending events to matching participants.\n- COMPLETED: latest run finished.\n- FAILED: latest run stopped with an error.",
      "enum": [
        "IDLE",
        "EXECUTING",
        "COMPLETED",
        "FAILED"
      ],
      "type": "string"
    },
    "filter_hints": {
      "description": "Checks derived from `participant_filter` that narrow the participants to consider. Scrip still evaluates the full CEL filter for each candidate.",
      "items": {
        "$ref": "#/$defs/AutomationFilterHint"
      },
      "type": "array"
    },
    "guard_condition": {
      "description": "CEL expression evaluated at trigger time; skips the participant if false",
      "type": "string"
    },
    "id": {
      "description": "Unique identifier for this automation",
      "format": "uuid",
      "type": "string"
    },
    "last_error": {
      "description": "Error message from the most recent cron execution, if any (cron trigger only)",
      "type": "string"
    },
    "last_evaluated_at": {
      "description": "When participant filters were last evaluated (PARTICIPANT_STATE trigger only)",
      "format": "date-time",
      "type": "string"
    },
    "last_run_at": {
      "description": "When this automation last fired (cron trigger only)",
      "format": "date-time",
      "type": "string"
    },
    "name": {
      "description": "Human-readable label for this automation",
      "type": "string"
    },
    "next_run_at": {
      "description": "When this automation will next fire (cron trigger only)",
      "format": "date-time",
      "type": "string"
    },
    "participant_filter": {
      "description": "CEL expression that determines which participants are enrolled",
      "type": "string"
    },
    "participant_id": {
      "description": "Target participant for program-scoped one-time automations",
      "format": "uuid",
      "type": "string"
    },
    "participants_processed": {
      "description": "Participants Scrip has sent the event to in the current run so far.",
      "type": "integer"
    },
    "participants_skipped_error": {
      "description": "Participants skipped because participant_filter or guard_condition CEL evaluation errored",
      "type": "integer"
    },
    "participants_total": {
      "description": "Total candidate participants in the current fan-out run.",
      "type": "integer"
    },
    "processed_at": {
      "description": "When this one-time automation was processed",
      "format": "date-time",
      "type": "string"
    },
    "program_id": {
      "description": "The program this automation belongs to",
      "format": "uuid",
      "type": "string"
    },
    "scope": {
      "description": "Whether the automation sends one event to the program (PROGRAM) or one event to each matching participant (PARTICIPANTS).",
      "enum": [
        "PROGRAM",
        "PARTICIPANTS"
      ],
      "type": "string"
    },
    "source": {
      "description": "How the automation was created.\n- API: created through the automations API.\n- RULE_ACTION: created by a SCHEDULE_EVENT or BROADCAST rule action.\n- SYSTEM: created by Scrip for scheduled work such as tier expiration.",
      "enum": [
        "API",
        "RULE_ACTION",
        "SYSTEM"
      ],
      "type": "string"
    },
    "source_event_id": {
      "description": "The event whose processing created this automation. Omitted when no source event is recorded, for example on automations created through the API.",
      "format": "uuid",
      "type": "string"
    },
    "source_rule_id": {
      "description": "The rule whose action created this automation. Omitted when no rule action created it, including automations created through the API.",
      "format": "uuid",
      "type": "string"
    },
    "status": {
      "description": "Whether the automation can fire.\n- ACTIVE: fires when its trigger is due.\n- PAUSED: does not fire until you set it back to ACTIVE.\n- COMPLETED: a one-time automation that has fired; it cannot fire again.\n- FAILED: stopped after a failure; set it to ACTIVE to try again.\n- ARCHIVED: removed from use; it never fires again.",
      "enum": [
        "ACTIVE",
        "PAUSED",
        "COMPLETED",
        "FAILED",
        "ARCHIVED"
      ],
      "type": "string"
    },
    "trigger": {
      "$ref": "#/$defs/AutomationTrigger",
      "description": "Trigger configuration (type, schedule, and timing)"
    },
    "updated_at": {
      "description": "When this automation was last updated",
      "format": "date-time",
      "type": "string"
    },
    "warnings": {
      "description": "Advisories about `participant_filter` and `guard_condition`, such as a counter, tag or attribute key that no rule in the program writes. They appear on create and update only, and they never block the save.",
      "items": {
        "$ref": "#/$defs/RuleWarning"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "AutomationAttributeDateScheduleConfig": {
      "description": "Use when schedule_type is ATTRIBUTE_DATE. Reads a date from each participant's attribute.",
      "properties": {
        "attribute_key": {
          "description": "Participant attribute containing the date value.",
          "type": "string"
        },
        "date_format": {
          "description": "Format stored in the participant attribute: MM-DD recurs yearly; YYYY-MM-DD fires for one calendar date.",
          "enum": [
            "MM-DD",
            "YYYY-MM-DD"
          ],
          "type": "string"
        },
        "offset": {
          "description": "Optional signed duration applied to the attribute date. Accepted units are ns, us or µs, ms, s, m, h, d, and w; units may be combined, while months and years are not accepted.",
          "type": "string"
        }
      },
      "required": [
        "attribute_key",
        "date_format"
      ],
      "title": "ATTRIBUTE_DATE schedule configuration",
      "type": "object"
    },
    "AutomationCronScheduleConfig": {
      "description": "Use when schedule_type is CRON. All subscribed participants share the same calendar schedule.",
      "properties": {
        "expression": {
          "description": "Five-field cron expression or descriptor such as @hourly or @daily; inline timezone directives are not accepted.",
          "type": "string"
        }
      },
      "required": [
        "expression"
      ],
      "title": "CRON schedule configuration",
      "type": "object"
    },
    "AutomationFilterHint": {
      "description": "A check derived from `participant_filter` that narrows the participants to consider.",
      "properties": {
        "type": {
          "description": "Check to apply before evaluating `participant_filter`.\n- HAS_TAG: value is a participant tag.\n- HAS_ATTRIBUTE: value is an attribute key.\n- HAS_COUNTER: value is a counter key.",
          "enum": [
            "HAS_TAG",
            "HAS_ATTRIBUTE",
            "HAS_COUNTER"
          ],
          "type": "string"
        },
        "value": {
          "description": "Non-empty tag value, attribute key, or counter key interpreted according to type.",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "type",
        "value"
      ],
      "title": "Automation filter hint",
      "type": "object"
    },
    "AutomationIntervalScheduleConfig": {
      "description": "Use when schedule_type is INTERVAL. Each participant fires relative to their own subscription time.",
      "properties": {
        "interval": {
          "description": "Positive duration between firings. Accepted units are ns, us or µs, ms, s, m, h, d, and w; units may be combined, while months and years are not accepted.",
          "type": "string"
        }
      },
      "required": [
        "interval"
      ],
      "title": "INTERVAL schedule configuration",
      "type": "object"
    },
    "AutomationThresholdScheduleConfig": {
      "description": "Use when schedule_type is THRESHOLD. Fires after a participant counter satisfies the comparison.",
      "properties": {
        "counter_key": {
          "description": "Participant counter to compare.",
          "type": "string"
        },
        "delay": {
          "description": "Non-negative duration to wait after the comparison matches before firing. Accepted units are ns, us or µs, ms, s, m, h, d, and w; units may be combined, while months and years are not accepted.",
          "type": "string"
        },
        "operator": {
          "description": "Comparison applied between the participant counter and threshold.",
          "enum": [
            ">=",
            ">",
            "==",
            "<=",
            "<"
          ],
          "type": "string"
        },
        "threshold": {
          "description": "Numeric counter value used by operator for the comparison; explicit 0 is valid.",
          "type": "number"
        }
      },
      "required": [
        "counter_key",
        "operator",
        "threshold",
        "delay"
      ],
      "title": "THRESHOLD schedule configuration",
      "type": "object"
    },
    "AutomationTrigger": {
      "description": "What starts an automation: a cron schedule, a single time, or a participant-state schedule.",
      "properties": {
        "cron_expression": {
          "description": "Cron expression for recurring schedules (cron trigger only)",
          "type": "string"
        },
        "schedule_config": {
          "anyOf": [
            {
              "$ref": "#/$defs/AutomationAttributeDateScheduleConfig"
            },
            {
              "$ref": "#/$defs/AutomationIntervalScheduleConfig"
            },
            {
              "$ref": "#/$defs/AutomationCronScheduleConfig"
            },
            {
              "$ref": "#/$defs/AutomationThresholdScheduleConfig"
            }
          ],
          "description": "Configuration selected by schedule_type for a PARTICIPANT_STATE trigger. The matching anyOf branch documents its required fields; unrecognized keys are ignored.",
          "type": "object"
        },
        "schedule_type": {
          "description": "Subscription schedule for a PARTICIPANT_STATE trigger.\n- ATTRIBUTE_DATE: derive each participant's trigger time from a date-valued attribute.\n- INTERVAL: fire at a fixed duration relative to each participant's subscription.\n- CRON: fire all subscribed participants on a shared cron schedule.\n- THRESHOLD: fire after a participant counter satisfies a comparison.",
          "enum": [
            "ATTRIBUTE_DATE",
            "INTERVAL",
            "CRON",
            "THRESHOLD"
          ],
          "type": "string"
        },
        "timezone": {
          "description": "IANA timezone for schedule evaluation (defaults to UTC)",
          "type": "string"
        },
        "trigger_at": {
          "description": "When to fire (ONE_TIME trigger only, RFC 3339, must be in the future; omit to run now)",
          "format": "date-time",
          "type": "string"
        },
        "type": {
          "description": "What starts the automation.\n- CRON: fires repeatedly on `cron_expression` in `timezone`.\n- ONE_TIME: fires once at `trigger_at`, or as soon as possible when `trigger_at` is omitted.\n- PARTICIPANT_STATE: keeps a subscription for each matching participant using `schedule_type` and `schedule_config`.",
          "enum": [
            "CRON",
            "ONE_TIME",
            "PARTICIPANT_STATE"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "RuleWarning": {
      "description": "A warning about a rule's condition or actions. It does not block the change. The usual cases are a reference to a key that no rule writes, and a reference to an event field that no recent event has.",
      "properties": {
        "client_ref": {
          "description": "The `client_ref` of the rule, when the rule is new.",
          "type": "string"
        },
        "code": {
          "description": "Warning code (e.g. `unknown_state_key`, `event_field_not_received`, `default_accessor_has`, `deprecated_alias`, `possible_unmarked_expression`, `missing_participant_context`).",
          "type": "string"
        },
        "event_type": {
          "description": "The event type the warning is about. Present only on an `event_field_not_received` warning for a rule whose condition checks `event.type` against fixed values. Omitted otherwise.",
          "type": "string"
        },
        "key": {
          "description": "The referenced key, as written in the condition. For an `event_field_not_received` warning it is the event field path.",
          "type": "string"
        },
        "kind": {
          "description": "Kind of reference: `counter`, `tag`, `attribute`, `alias`, or `field` for an event field.",
          "type": "string"
        },
        "message": {
          "description": "Human-readable explanation (includes the suggestion when one exists).",
          "type": "string"
        },
        "rule_id": {
          "description": "Rule identity is populated for complete-configuration validation. The\nsingle-rule authoring surfaces omit these fields.",
          "type": "string"
        },
        "rule_set_id": {
          "description": "The id of the rule set that holds the rule.",
          "type": "string"
        },
        "scope": {
          "description": "Where the referenced state belongs: `participant`, `program`, `group`, or `event` for an event field.",
          "type": "string"
        },
        "suggestion": {
          "description": "Closest known key, when a near-match exists. Empty otherwise.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/scrip-dev-automation-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.