Webhooks

Update a webhook's URL, name, secret key, subscribed events, or enabled state.

Fields sent as null keep their current value. subscriptions, when sent, replaces the whole list.

put/api/v2/webhooks/{webhook_id}

Request

  • Base URL
    https://stream-app-service.streampay.sa
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Path parameters

webhook_idstring uuid required

Request body

urlstring uri nullable

HTTPS URL that receives event notifications. It must use port 443 and resolve to a public address. Omit or send null to keep the current URL.

enabledboolean nullable

Whether events are delivered to this webhook. Omit or send null to keep the current value.

secret_keystring nullable

Secret used to sign each delivery. Every request carries an X-Webhook-Signature: t=<timestamp>,v1=<signature> header, where <signature> is the hex HMAC-SHA256 of <timestamp>.<raw request body> keyed with this secret. Omit or send null to keep the current secret.

namestring nullable

Label to tell webhooks apart. Omit or send null to keep the current name.

subscriptionsWebhookEventType[] nullable

Events this webhook receives. GET /v2/webhooks/events lists the available events. Replaces the whole list. Omit or send null to keep the current events.

Response

Successful Response

idstring uuid

Unique identifier (UUID) of the webhook.

urlstring uri

HTTPS URL that receives event notifications.

namestring nullable

Label to tell webhooks apart.

enabledboolean

Whether events are delivered to this webhook.

health_status'ENABLED' | 'WARNING' | 'DISABLED' | 'BLOCKED'

Computed health status for merchant webhook list UI.

created_bystring uuid

ID of the user who created the webhook.

Changes