Create a webhook subscription to receive real-time blockchain event notifications. Specify event types, target URL, and filtering criteria to monitor specific on-chain activities.
A JWT signed using your CDP API Key Secret, encoded in base64. Refer to the Generate Bearer Token section of our Authentication docs for information on how to generate your Bearer Token.
Request to create a new webhook subscription with support for both traditional single-label and multi-label filtering formats.
Types of events to subscribe to. Event types follow a three-part dot-separated format: service.resource.verb (e.g., "wallet.transaction.created", "token.transfer.completed"). The subscription will only receive events matching these types AND the label filter(s).
[
"wallet.transaction.created",
"token.transfer.completed"
]Whether the subscription is enabled.
true
Target configuration for webhook delivery. Specifies the destination URL and any custom headers to include in webhook requests.
{
"url": "https://api.example.com/webhooks",
"headers": {
"Authorization": "Bearer token123",
"Content-Type": "application/json"
}
}Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair in addition to the event types. Only events matching both the event types AND this label filter will be delivered. NOTE: Use either (labelKey + labelValue) OR labels, not both.
"contract_address"
Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key). Only events with this exact label value will be delivered. NOTE: Use either (labelKey + labelValue) OR labels, not both.
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
Description of the webhook subscription.
"Subscription for token transfer events"
Additional metadata for the subscription.
{
"custom_field": "custom_value",
"webhook_version": "v1"
}Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when an event contains ALL the key-value pairs specified here. Additional labels on the event are allowed and will not prevent matching. NOTE: Use either labels OR (labelKey + labelValue), not both.
{
"env": "dev",
"team": "payments",
"contract_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}Webhook subscription created successfully.
Response containing webhook subscription details.
When the subscription was created.
"2025-01-15T10:30:00Z"
Types of events to subscribe to. Event types follow a three-part dot-separated format: service.resource.verb (e.g., "wallet.transaction.created", "token.transfer.completed").
[
"wallet.transaction.created",
"token.transfer.completed"
]Whether the subscription is enabled.
true
Unique identifier for the subscription.
"123e4567-e89b-12d3-a456-426614174000"
Target configuration for webhook delivery. Specifies the destination URL and any custom headers to include in webhook requests.
{
"url": "https://api.example.com/webhooks",
"headers": {
"Authorization": "Bearer token123",
"Content-Type": "application/json"
}
}Description of the webhook subscription.
"Subscription for token transfer events"
Additional metadata for the subscription.
{
"secret": "123e4567-e89b-12d3-a456-426614174000"
}Label key for filtering events. Present when subscription uses traditional single-label format.
"contract_address"
Label value for filtering events. Present when subscription uses traditional single-label format.
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs. Present when subscription uses multi-label format.
{
"env": "dev",
"team": "payments",
"contract_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}