Skip to main content
POST
Create Webhook Endpoint

Create Webhook Endpoint

POST https://api.baanx.com/v1/webhooks Creates a new webhook configuration for receiving event notifications.

Overview

Registers a new HTTPS endpoint to receive webhook deliveries. Each webhook can subscribe to one or more event types and is assigned a unique signing key for signature verification.
Save the API key immediately. The full API key is returned only at creation time and cannot be retrieved again. If lost, use the Rotate Key endpoint to generate a new one.
Limits and defaults:
  • Maximum of 5 webhook endpoints per partner
  • New webhooks are created with is_active: false by default unless explicitly set
  • Only HTTPS URLs are accepted

Signature Verification

All webhook deliveries include HMAC-SHA256 signature headers: Verify webhooks by computing:

Authentication

This endpoint requires authentication via Bearer token:

Request

Headers

string
required
Bearer token for authentication
string
required
Must be application/json

Body

string
required
Human-readable name for the webhook (max 255 characters)
string
required
HTTPS endpoint URL for webhook delivery. Must use HTTPS.
array
required
Array of event type strings to subscribe to. Must contain at least one item.Available event types:
  • kyc.status.changed - User KYC verification status changed
  • card.activated - Card has been activated
  • transaction.cleared - Transaction has been cleared
boolean
default:false
Whether to activate the webhook immediately. Defaults to false.
object
Optional custom metadata to attach to the webhook (e.g., environment tags)

Request Examples

Response

201 Created

Store the apiKey from the response immediately and securely. It will not be shown again.
boolean
Indicates the webhook was created successfully
string (UUID)
Unique identifier for the new webhook
string
Full API key — store securely. Used to verify webhook signatures. Not retrievable after this response.
array
Event types the webhook is subscribed to
boolean
Whether the webhook is active

Error Responses

Common Error Scenarios

Error: 400 Bad RequestMessage: "Maximum webhook limit (5) reached for this tenant"Cause: You already have 5 webhook endpoints configured.Solution: Delete an existing webhook with DELETE /v1/webhooks/{id} before creating a new one.
Error: 400 Bad RequestCause: The url field does not use the HTTPS scheme.Solution: Ensure your endpoint URL begins with https://.
  • GET /v1/webhooks - List all webhook endpoints
  • PUT /v1/webhooks/{id} - Update a webhook configuration
  • POST /v1/webhooks/{id}/rotate-key - Rotate the signing key
  • DELETE /v1/webhooks/{id} - Delete a webhook endpoint