Skip to main content
PUT
/
v1
/
webhooks
/
{id}
Update Webhook Endpoint
curl --request PUT \
  --url https://api.example.com/v1/webhooks/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "name": "<string>",
  "url": "<string>",
  "event_types": [
    {}
  ],
  "is_active": true,
  "metadata": {}
}
'
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "tenant": "partner-name",
    "name": "Updated Webhook Name",
    "url": "https://api.partner.com/webhooks/new",
    "apiKey": "whk_****...****5678",
    "eventTypes": ["kyc.status.changed", "card.activated"],
    "isActive": true,
    "metadata": {},
    "createdAt": "2025-12-29T10:00:00.000Z",
    "updatedAt": "2025-12-29T12:30:00.000Z"
  }
}

Update Webhook Endpoint

PUT https://api.baanx.com/v1/webhooks/{id} Updates an existing webhook configuration.

Overview

All fields are optional — only provide the fields you want to change. The response returns the full updated webhook configuration with a masked API key.
To change the API key used for signature verification, use the Rotate Key endpoint instead.

Authentication

This endpoint requires authentication via Bearer token:
Authorization: Bearer YOUR_ACCESS_TOKEN

Request

Headers

Authorization
string
required
Bearer token for authentication
Content-Type
string
required
Must be application/json

Path Parameters

id
string (UUID)
required
Unique identifier of the webhook configuration to update

Body

All body fields are optional. Only include the fields you wish to update.
name
string
New human-readable name for the webhook (max 255 characters)
url
string
New HTTPS endpoint URL. Must use HTTPS.
event_types
array
New list of event type strings. Replaces the existing list. Must contain at least one item if provided.
is_active
boolean
Set to true to activate or false to deactivate the webhook
metadata
object
Custom metadata to attach to the webhook. Replaces existing metadata.

Request Examples

curl -X PUT https://api.baanx.com/v1/webhooks/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "is_active": true
  }'

Response

200 Success

success
boolean
Indicates the webhook was updated successfully
data
object
The full updated webhook configuration with masked API key. See Get Webhook for field descriptions.
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "tenant": "partner-name",
    "name": "Updated Webhook Name",
    "url": "https://api.partner.com/webhooks/new",
    "apiKey": "whk_****...****5678",
    "eventTypes": ["kyc.status.changed", "card.activated"],
    "isActive": true,
    "metadata": {},
    "createdAt": "2025-12-29T10:00:00.000Z",
    "updatedAt": "2025-12-29T12:30:00.000Z"
  }
}

Error Responses

{
  "message": "url must be an HTTPS URL"
}
  • GET /v1/webhooks/{id} - Get current webhook configuration
  • POST /v1/webhooks/{id}/rotate-key - Rotate the signing API key
  • DELETE /v1/webhooks/{id} - Delete this webhook