What You’ll Build: A verified webhook subscription that receives live
vehicle_location.added events and handles them securely.Prerequisites: You’ll need a valid access token before starting. If you haven’t authenticated yet, see Step 1 of the Quickstart Guide.
How It Works
Instead of polling the API for updates, Catena pushes a notification to your server the moment data changes.Step 1: Create Your Endpoint
Set up an HTTPS URL on your server that acceptsPOST requests and returns 202 Accepted within 3 seconds. Return the acknowledgment immediately — process the event in a background job.
Python
Step 2: Subscribe to an Event
Call the Notifications API to create a subscription. The example below subscribes tovehicle_location.added, which fires every time a new GPS location is ingested for any vehicle in your connected fleets.
cURL
Response
id in the response is your subscription ID — you’ll use it to manage and monitor this webhook later.
Unique Subscriptions: You can only create one subscription per unique combination of event type, endpoint URL, and filters. To send the same events to multiple endpoints, create separate subscriptions with different URLs.
Step 3: Understand What You’ll Receive
Every webhook is aPOST request with a gzip-compressed JSON body. After decompressing, the payload follows this structure:
vehicle_location.added payload
data— Always an array. Iterate over it even when you expect a single record.fleet_ref— Your own identifier for the fleet, set when you created the invitation. Use this to route events to the right customer in your system without a separate API lookup. Will benullif nofleet_refwas set at invitation time.source_name— The underlying telematics provider that reported the data (e.g.samsara,motive,geotab).occurred_at— When the event happened at the TSP. Use this for ordering, not the outertimestamp.delivery_attempt— Increments with each retry. If this is greater than1, the event may be a duplicate.
Step 4: Verify the Signature
Before processing any event, verify it genuinely came from Catena. Every request includes two security headers:X-Catena-Signature (an HMAC-SHA256 digest) and X-Catena-Timestamp. The signature is computed as:
Python
Event Filtering
Use filters to scope webhook delivery to specific fleets, reducing unnecessary notifications and processing overhead:Filter by Fleet ID
Filter by Fleet ID
Receive events only for specific fleets using Catena’s internal fleet IDs.
Filter by Fleet Reference
Filter by Fleet Reference
Target events for fleets using your custom fleet references (the ID of the fleet in your system).
Combine Both Filters
Combine Both Filters
Use both fleet IDs and fleet references together. Filters use OR logic — events matching either criteria will be delivered.
Recommended: Single Webhook per Event Type
The recommended approach is to create one webhook subscription per event type without any filters. This gives you a single, organization-wide stream that automatically covers all fleets — including new ones you onboard in the future.Create One Subscription per Event Type
Subscribe to an event type (e.g.,
vehicle.modified) without filters to receive events from all fleets across your organization.Identify the Fleet
Each event payload includes both a
fleet_id and a fleet_ref field. Use fleet_ref — your own identifier for the fleet set at invitation time — to route events to the right customer without a separate API lookup. Note that fleet_ref will be null if it wasn’t set when the invitation was created.Map to Your System
If you didn’t set a
fleet_ref when creating the invitation, use the Organizations API to map fleet_id to your internal customer identifiers.Invitation Lifecycle Events: To track the full sequence of webhook events when onboarding a fleet — from invitation creation through to data ingestion — see the Inviting Fleets guide. If you already follow the recommended approach above for
invitation.*, share_agreement.*, connection.*, and fleet_connection.* events, you do not need to set a callback_url on the invitation.Invitation Lifecycle Events: To track the full sequence of webhook events when onboarding a fleet — from invitation creation through to data ingestion — see the Inviting Fleets guide. If you already follow the recommended approach above for
invitation.*, share_agreement.*, connection.*, and fleet_connection.* events, you do not need to set a callback_url on the invitation.What’s Next
Common Questions
Answers to the most frequently asked questions about webhooks, event behavior, and troubleshooting.
Security Reference
Full header reference, key rotation, and security best practices.
Monitoring & Replay
Track delivery metrics, view logs, replay failed events, and manage the webhook lifecycle.
Notifications API Reference
Complete API reference for all webhook endpoints.
Contact Support
Have questions or need assistance? Our team is here to help you succeed.