Overview
Get started with CDP webhooks in just a few steps. This guide walks through creating a subscription that monitors USDC transfers on Base. Once you have the basic flow working, swap in any of the other event domains.Prerequisites
A Secret API Key
A Secret API Key
Sign up at portal.cdp.coinbase.com, then navigate to API Keys and select Create API key under the Secret API Keys tab.
- Enter an API key nickname (restrictions are optional)
- Click Create
- Secure your API Key ID and Secret in a safe location
A webhook URL
A webhook URL
You’ll need an HTTPS URL to receive webhook events. For quick testing, webhook.site gives free temporary URLs instantly.For production, use your own HTTPS endpoint.
CDP CLI
CDP CLI
The CDP CLI handles authentication and exposes webhook subscription endpoints as typed commands (
cdp data webhooks subscriptions create, list, update, delete). For raw HTTP, use cdp api.1. Review the configuration
Thecontract_address used in the example below is the USD Base Coin contract.
Configuration fields
Below is a list of all payload information that can be provided when creating a webhook subscription:| Field | Description | Required | Notes |
|---|---|---|---|
target.url | Your webhook endpoint URL | Yes | Must be a valid HTTPS URL |
labels.contract_address | Smart contract address to monitor | Yes | Hex address with 0x prefix |
labels.event_name | Smart contract event name | Yes* (this OR event_signature) | Event name from ABI (e.g., Transfer) |
labels.event_signature | Smart contract event signature | Yes* (this OR event_name) | Full signature (e.g., Transfer(address,address,uint256)) |
eventTypes | Array of event types | No | Use ["onchain.activity.detected"] if provided |
isEnabled | Enable/disable webhook | No | Defaults to true |
target.headers | Custom HTTP headers | No | Object with header key-value pairs |
labels.transaction_from | Transaction source address | No | |
labels.transaction_to | Transaction destination address | No | |
labels.network | Network name (e.g. base-mainnet or base-sepolia) | No | Defaults to base-mainnet |
labels.params.[any_param] | Any smart contract parameter | No | Add any parameter from the contract event for hyper-granular filtering (e.g., params.from, params.to, params.value) |
Custom headers
You can also set aheaders object in target if your URL requires specific headers:
2. Create subscription
response.json
Manage subscriptions
Use thesubscriptionId from the response to view, update, or delete the subscription.
List all subscriptions
View subscription details
Update subscription
update requires all fields, even ones you aren’t changing — it’s a full replace:
cdp data webhooks subscriptions update --help to see all available fields.
Delete subscription
List subscription events
View delivery attempts for a subscription, including delivery status, retry count, and HTTP response details:== for query params):
| Parameter | Description |
|---|---|
eventId | Filter by a specific event ID |
minCreatedAt | Only include events created at or after this timestamp (RFC 3339, e.g. 2025-01-15T00:00:00Z) |
maxCreatedAt | Only include events created at or before this timestamp (RFC 3339) |
eventTypeNames | Filter by event type names, comma-separated (e.g. onchain.activity.detected) |
What to read next
- Wallet webhooks: Track the full transaction lifecycle, signing operations, and delegation events for Server and Embedded Wallets.
- Multi-address subscriptions: Monitor up to 100 wallet addresses with a single subscription.
- Verify webhook signatures: Learn how to verify webhook signatures to ensure events are coming from Coinbase.
- Support: Join our Discord for help and community support.