Webhook Quick Start
Receive real-time fleet event notifications in under 15 minutes
This guide gets you from zero to a working, verified webhook in four steps. You’ll create an endpoint, subscribe to an event, understand what you’ll receive, and verify it is authentic.
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 accepts POST requests and returns 202 Accepted within 3 seconds. Return the acknowledgment immediately — process the event in a background job.
Not ready to build yet? Use webhook.site or RequestBin to get a public HTTPS URL instantly and inspect live payloads before writing any code.
Step 2: Subscribe to an Event
Call the Notifications API to create a subscription. The example below subscribes to vehicle_location.added, which fires every time a new GPS location is ingested for any vehicle in your connected fleets.
Save your secret immediately. The secret is shown in full only once. Copy it to your secrets manager now — all subsequent reads return *****.
Catena will begin delivering events to your endpoint right away. The 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 a POST request with a gzip-compressed JSON body. After decompressing, the payload follows this structure:
A few fields worth calling out:
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:
You’re live. Catena is now delivering real-time fleet events to your endpoint.
Event Filtering
Use filters to scope webhook delivery to specific fleets, reducing unnecessary notifications and processing overhead:
Filter by Fleet ID
Receive events only for specific fleets using Catena’s internal fleet IDs.
Filter by Fleet Reference
Target events for fleets using your custom fleet references (the ID of the fleet in your system).
Combine Both Filters
Use both fleet IDs and fleet references together. Filters use OR logic — events matching either criteria will be delivered.
Omit Filters to Receive All Events: If you don’t specify any filters, you’ll receive all events of the subscribed type across your entire organization.
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.
Use wildcard patterns like vehicle.* to subscribe to all actions for a resource (added, modified, removed) with a single subscription.
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.