Setup & Configuration
This page explains how to configure webhook endpoints to receive real-time event notifications from Safe Infrastructure.
Webhooks require a Growth or Scale plan. See Pricing & Plans for details.
Prerequisites
Before setting up webhooks, you need:
- A Safe Infrastructure account on the Growth or Scale plan.
- An API key from the developer dashboard ↗ (opens in a new tab).
- A publicly accessible HTTPS endpoint that can receive POST requests.
Configuring a webhook endpoint
Via the developer dashboard
- Log in to the developer dashboard (opens in a new tab).
- Navigate to Webhooks.
- Click Add Endpoint.
- Enter your endpoint URL (must be HTTPS).
- Select the event types you want to subscribe to.
- Optionally, filter by chain ID or Safe address.
- Save your configuration.
Endpoint requirements
Your webhook endpoint must:
- Accept
POSTrequests withContent-Type: application/json. - Respond with a
2xxHTTP status code within a reasonable timeout (recommended: under 5 seconds). - Be publicly reachable over HTTPS.
Example: Minimal webhook receiver (Node.js)
_30import express from 'express';_30_30const app = express();_30app.use(express.json());_30_30app.post('/webhooks/safe', (req, res) => {_30 const event = req.body;_30_30 console.log(`Received event: ${event.type} for Safe ${event.address}`);_30_30 // Process the event asynchronously_30 processEvent(event).catch(console.error);_30_30 // Acknowledge receipt immediately_30 res.status(200).send('OK');_30});_30_30async function processEvent(event) {_30 switch (event.type) {_30 case 'EXECUTED_MULTISIG_TRANSACTION':_30 // Handle executed transaction_30 break;_30 case 'INCOMING_ETHER':_30 // Handle incoming ETH_30 break;_30 // ... handle other event types_30 }_30}_30_30app.listen(3000, () => console.log('Webhook receiver listening on port 3000'));
Filtering
You can filter webhook subscriptions by:
- Chain ID: Only receive events for specific networks (for example, Ethereum mainnet, Polygon).
- Event type: Subscribe to specific event types only.
- Address: Filter events for specific Ethereum addresses.
Security recommendations
- Use HTTPS: Webhook endpoints must use HTTPS to protect event payloads in transit.
- Configure an Authorization header: Add authentication to your endpoint to verify that requests originate from Safe Infrastructure.
- Validate payloads: Check that the event payload structure matches the expected schema before processing.
Subscription limits
The number of webhook subscriptions you can configure depends on your plan:
| Plan | Subscription limit |
|---|---|
| Growth | Standard |
| Scale | Higher (custom) |
Contact support@safe.global if you need additional subscriptions beyond your plan's limit.
Next steps
- Webhooks Overview: How webhooks work and retry semantics.