Skip to main content
PATCH
/
v1
/
webhooks
/
{webhook_id}
Update webhook
curl --request PATCH \
  --url https://api.adullam.dev/v1/webhooks/{webhook_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "events": [
    "payment.created"
  ],
  "status": "active"
}
'
{
  "id": "webhook_abc123",
  "url": "https://mystore.com/webhooks/adullam",
  "events": [
    "payment.completed",
    "payment.failed",
    "transfer.completed"
  ],
  "status": "active",
  "secret": "whsec_abc123def456...",
  "description": "Production webhook",
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-15T10:00:00Z"
}

Update Webhook

Modifying an existing webhook allows you to change its configuration, such as the target URL, subscribed events, or custom headers. Use the Update Webhook API to update the settings of a specific webhook by its ID.

Authorizations

Authorization
string
header
required

Use the access token obtained from /v1/auth/token

Path Parameters

webhook_id
string
required

Webhook ID

Body

application/json
events
enum<string>[]
Available options:
payment.created,
payment.processing,
payment.completed,
payment.failed,
payment.refunded,
transfer.created,
transfer.processing,
transfer.completed,
transfer.failed,
transfer.reversed
status
enum<string>
Available options:
active,
inactive

Response

Webhook updated

id
string
Example:

"webhook_abc123"

url
string<uri>
Example:

"https://mystore.com/webhooks/adullam"

events
string[]
Example:
[
  "payment.completed",
  "payment.failed",
  "transfer.completed"
]
status
enum<string>
Available options:
active,
inactive
Example:

"active"

secret
string

Secret key for webhook signature verification

Example:

"whsec_abc123def456..."

description
string
Example:

"Production webhook"

created_at
string<date-time>
Example:

"2024-01-15T10:00:00Z"

updated_at
string<date-time>
Example:

"2024-01-15T10:00:00Z"