Ingest an event
Submit an event for asynchronous rule evaluation. The idempotency_key is the logical event identity scoped to the program: reusing the same key returns the same deterministic event_id and does not create another event, even if the payload differs. To correct or replace an event, submit a new event with a new idempotency_key. Existing participants are automatically enrolled in the target program. Inactive enrollments are reactivated. Business validation happens asynchronously — invalid submissions may not materialize as events. Subscribe to event.failed webhooks for error notification.
Submits an event for asynchronous rule evaluation. The API returnsDocumentation Index
Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt
Use this file to discover all available pages before exploring further.
202 Accepted immediately. A worker picks up the event, evaluates all matching rules, and executes their actions.
Identify the participant with exactly one of external_id or participant_id. Pass event_timestamp for when the event occurred and event_data containing the payload your rules will evaluate against. Optionally set recipient_id or recipient_external_id to route rewards to a different participant (e.g. gifting).
The idempotency_key is required and scoped per program. Submitting the same key with an identical payload returns the original event without reprocessing. Submitting the same key with a different payload returns 409 Conflict (idempotency_conflict). Use deterministic keys like order-12345-completed, not random UUIDs.
If the participant doesn’t exist yet and the program’s on_unknown_participant is CREATE, Scrip creates the participant and processes the event in one step. The on_unknown_participant setting controls creation of new participants only.
Existing participants are automatically enrolled in the target program if not already members. Inactive enrollments (FROZEN, LOCKED, or CLOSED) are reactivated. Enrollment behavior applies regardless of the on_unknown_participant setting.
Business validation (program existence, participant resolution) happens asynchronously. Subscribe to event.failed webhooks for error notification.
Authorizations
API key passed in the X-API-Key header.
Body
Event with event_data for rule evaluation
EventData contains the event data used for rule condition evaluation
EventTimestamp is when the event occurred (used for rule evaluation)
"2024-01-15T10:30:00Z"
IdempotencyKey ensures this event is only processed once (must be unique per program)
1 - 255"order-12345-completed"
ProgramID links this event to a specific program for rule evaluation
"550e8400-e29b-41d4-a716-446655440000"
Your system's identifier for the user who triggered this event. Mutually exclusive with participant_id - exactly one must be provided. Auto-creates a participant if this ID doesn't exist (based on the program's on_unknown_participant setting). Existing participants are automatically enrolled in the target program.
1 - 255"user_abc123"
Scrip's UUID for the participant. Mutually exclusive with external_id - exactly one must be provided. The participant is automatically enrolled in the target program if not already a member.
"550e8400-e29b-41d4-a716-446655440000"
RecipientExternalID optionally specifies a different participant (by external ID) to receive rewards. Mutually exclusive with RecipientID. The recipient is automatically enrolled in the target program if not already a member.
1 - 255"user_xyz789"
RecipientID optionally specifies a different participant (by UUID) to receive rewards (e.g., gifting). Mutually exclusive with RecipientExternalID. The recipient is automatically enrolled in the target program if not already a member.
"550e8400-e29b-41d4-a716-446655440001"
Response
Event accepted for async processing (new or duplicate)
When the event occurred (from the ingestion request)
Your system's identifier for the user, if provided
Unique identifier for the created event
Client-provided unique key for deduplication
Participant UUID. May be null if only external_id was provided (resolution may be deferred to async processing).
Program the event was ingested into
Processing status (PENDING on initial ingestion)