Webhooks V2

Update webhook

Update a webhook by its id

Endpoint Permission: Owner, Admin, Non-Signing Admin.

patch/webhooks/{webhookId}

Request

Path parameters

webhookIdstring uuid required
Example:44fcead0-7053-4831-a53a-df7fb90d440f

The unique identifier of the webhook

Request body

urlstring

The url of the webhook where notifications will be sent. URL must be valid, unique and https.

descriptionstring

description of the webhook of what it is used for.should not contain special characters.

eventsWebhookEvent[]

The events that the webhook will be subscribed to

enabledboolean

The status of the webhook

webhookMtlsIdstring uuid nullable

The id of the mTLS configuration this webhook presents when delivering, from /v1/webhooks_settings/mtls. Several webhooks may share one configuration, so replacing its certificate covers all of them at once. Send null to stop using mTLS for this webhook.

webhookOauthIdstring uuid nullable

The id of the OAuth credentials this webhook authenticates with, from /v1/webhooks_settings/oauth. Several webhooks may share one credential set, so rotating its client secret covers all of them at once. Send null to stop using OAuth for this webhook. Cannot be combined with an authorization custom header on the same webhook; a request that would leave both set is rejected.

customHeadersWebhookCustomHeadersUpdate nullable

A delta applied to the delivery headers. A header with a value is added or replaced, a header with null is deleted, and one you leave out is untouched. A value replaces what is stored under that name rather than adding to it, so an array is the complete new set of lines for that header. Send customHeaders: null to clear every header in one call. That does not collide with a null value on a name: one names the header to delete, the other names the whole field. Names are case-insensitive, so a null under one casing deletes a header stored under another. Same rules as on create: string or non-empty array, Cookie and Authorization string-only, 10 headers and under 16 KB in the resulting set, the same reserved names, and values write-only. Entries set to null do not count towards the limit. Authorization cannot be combined with webhookOauthId, though one request may add it and detach the credentials together.

Example request

{
  "url": "https://example.com/webhook",
  "description": "This webhook is used for transactions notifications",
  "events": [
    "transaction.created",
    "transaction.status.updated"
  ],
  "webhookMtlsId": "6f1b7c62-0f2e-4f1a-9a5e-9f2b1c3d4e5f",
  "webhookOauthId": "123e4567-e89b-12d3-a456-426614174000",
  "customHeaders": {
    "X-Gateway-Key": "abc123",
    "X-Forwarded-For": [
      "203.0.113.7",
      "198.51.100.4"
    ],
    "X-Region-Tag": null
  }
}

Response

Updated webhook object

idstring uuid required

The id of the webhook

urlstring required

The url of the webhook where notifications will be sent. Must be a valid URL and https.

descriptionstring

description of the webhook of what it is used for

eventsWebhookEvent[] required

The events that the webhook will be subscribed to

status'DISABLED' | 'ENABLED' | 'SUSPENDED' required

The status of the webhook

createdAtinteger required

The date and time the webhook was created in milliseconds

updatedAtinteger required

The date and time the webhook was last updated in milliseconds

webhookMtlsIdstring uuid

The id of the mTLS configuration this webhook presents when delivering, from /v1/webhooks_settings/mtls. Absent when the webhook does not use mTLS.

webhookOauthIdstring uuid

The id of the OAuth credentials this webhook authenticates with. Absent when the webhook does not use OAuth. Read the credentials themselves from /v1/webhooks_settings/oauth/{webhookOauthId}.

customHeadersstring[]

Names of the custom headers configured for this webhook. Header values are never returned.

Example response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "url": "https://example.com/webhook",
  "description": "This webhook is used for transactions notifications",
  "events": [
    "transaction.created",
    "transaction.status.updated"
  ],
  "status": "ENABLED",
  "createdAt": 1625126400000,
  "updatedAt": 1625126400000,
  "webhookMtlsId": "6f1b7c62-0f2e-4f1a-9a5e-9f2b1c3d4e5f",
  "webhookOauthId": "123e4567-e89b-12d3-a456-426614174000",
  "customHeaders": [
    "x-gateway-key",
    "x-region-tag"
  ]
}

Changes

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