Events
Ingest an event
Submit an event for asynchronous rule evaluation; the same idempotency_key for a program returns the existing event instead of creating a new one.
post/v1/events
Request
- Base URL: https://api.scrip.dev
- URL: https://api.scrip.dev/v1/events
- Auth: HTTP bearer
Headers
Idempotency-Keystring
A key you choose to make this request safe to retry: 1 to 255 printable ASCII characters. Send the same key with the same request to get the first response again, marked Idempotent-Replayed: true. Routes that return a secret once, and claim links, do not replay a response. Event ingest uses the key as the event's identity.
Request body
Example request
{
"event_data": {
"amount": 120,
"type": "purchase"
},
"event_timestamp": "2027-01-15T10:30:00Z",
"external_id": "user_123",
"idempotency_key": "order-1001-completed",
"participant_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006",
"program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
"recipient_external_id": "user_xyz789",
"recipient_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b007"
}Response
Event accepted for async processing (new or duplicate)
Example response
{
"event_timestamp": "2027-01-15T10:30:00Z",
"external_id": "user_123",
"id": "e5dc1b6a-7f3d-4e2a-8c1b-9a0f4d7e6c05",
"idempotency_key": "order-1001-completed",
"participant_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006",
"program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
"status": "PENDING",
"status_url": "/v1/events/e5dc1b6a-7f3d-4e2a-8c1b-9a0f4d7e6c05"
}Changes
No recorded changes to this operation across all 1 revision of this API.