Webhooks

Create a webhook endpoint

Register a URL to receive webhook notifications for selected event types.

post/v1/webhook-endpoints

Request

  • Base URL: https://api.scrip.dev
  • URL: https://api.scrip.dev/v1/webhook-endpoints
  • 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

descriptionstring

Human-readable label for this endpoint

enabled_eventsstring[] required

Event types to subscribe to (use * for all)

metadataunknown
urlstring required

HTTPS URL that will receive webhook deliveries

Example request

{
  "description": "Production webhook receiver",
  "enabled_events": [
    "balance.credited",
    "balance.debited"
  ],
  "url": "https://example.com/webhooks/scrip"
}

Response

Endpoint created (includes secret)

circuit_broken_untilstring

When set and in the future, the circuit breaker has paused deliveries to this endpoint until this time (sustained delivery failures)

created_atstring date-time

When the endpoint was created

descriptionstring

Human-readable label

enabled_eventsstring[]

Subscribed event types

idstring uuid

The id of the webhook endpoint. Use it in webhook_endpoint_id paths.

metadataunknown
rate_limited_untilstring

When set and in the future, 429 rate-limit backoff has paused deliveries to this endpoint until this time

secretstring

Signing secret. Scrip returns it only when you create the endpoint or rotate the secret, so store it right away.

status'ACTIVE' | 'DISABLED' | 'ARCHIVED'

The endpoint's lifecycle state.

updated_atstring date-time

When the endpoint was last modified

urlstring

Destination URL for deliveries

Example response

{
  "circuit_broken_until": "2027-12-31T23:59:59Z",
  "created_at": "2027-01-15T10:30:00Z",
  "description": "Production webhook receiver",
  "enabled_events": [
    "balance.credited",
    "balance.debited"
  ],
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "rate_limited_until": "2027-12-31T23:59:59Z",
  "secret": "whsec_3f9a1c7e5b2d84060e1a9c3d7f5b2e8a4c6d0f1b3a5e7c9d2f4b6a8e0c1d3f57",
  "status": "ACTIVE",
  "updated_at": "2027-01-15T10:30:00Z",
  "url": "https://example.com/webhooks/scrip"
}

Changes

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