How it works
- Create a webhook via
POST /v2/api/webhooks. You receive a plaintext HMAC secret in the response — save it securely, it is returned only once. - Link one or more alert configurations to the webhook (via
alertIdson creation, or later viaPOST /v2/api/webhooks/{id}/link-alert). Alternatively, setisGlobal: trueto receive alerts from your company and all its sub-companies (see Global vs alert-scoped webhooks). - When a linked alert fires, Telemax sends an HTTP
POSTto your URL with a signed JSON payload.
Payload shape
Every webhook payload key on this page is PascalCase, unlike REST API responses, which are camelCase. Match key names exactly.Type-specific Data payloads
The Data field carries additional context depending on AlertType:
Geofence ("Geofence")
"Ignition")
"LowBattery")
"ExceedMaximumSpeed")
Speed and MaxSpeed are in km/h, and Voltage and Threshold in volts. All four are decimal numbers; whole values are sent without a decimal point.
For every other alert type, Data is null.
Supported alert types
The integer type ID is the one the422 error message quotes. GET /v2/api/companies/{id}/alert-records returns only some of these types as alertType; see its Alert types. GET /v2/api/companies/{id}/alerts returns a name instead, so the tables list both.
Alert-scoped webhooks
Alert configurations of these types can be linked to a webhook. A maximum of 50 alert configurations can be linked to a single webhook.
Linking a type that is not in this table returns
422. The exception is Exceed Engine Temperature (17): the link is accepted, but nothing is delivered for it.
Global webhooks
A global webhook receives the six types above, with the same payloads, plus these types withData: null:
Some of these values contain spaces. For types 3, 12, 13 and 14 the payload value differs from the name
GET …/alerts returns. Charging (15), Exceed RPM (16), Exceed Engine Temperature (17) and Driving after dark (20) are not delivered to webhooks.
Request headers
Every delivery includes two headers:Verifying the signature
ComputeHMAC-SHA256(secret, rawBody) and compare the hex digest to the value after sha256= in X-Telemax-Signature. Use the secret exactly as it was returned, as UTF-8 text; do not hex-decode it. Always compare using a constant-time function to prevent timing attacks.
Global vs alert-scoped webhooks
When multiple alert types are linked to one webhook,
Data will have different structures per delivery. The AlertType field tells you which shape to expect. Consider using one webhook per alert type for simpler integration.Delivery retries
Telemax normally makes up to 3 attempts per event, within about 22 seconds. An attempt fails on a non-2xx response, a connection error, or no response within 5 seconds. The second attempt follows 2 seconds after the first fails, and the third 5 seconds after the second. After the third failure the event is dropped. If your host name does not resolve, or resolves only to a private or reserved address, when the event is sent, the event is dropped without an attempt. Respond with a2xx within 5 seconds, and do any heavy processing asynchronously.
Register the final URL of your endpoint and do not rely on redirects. A 300, 301, 302 or 303 is re-sent as a GET without the body, so the event can count as delivered while your endpoint never receives it.
X-Telemax-Delivery changes on every attempt, so it cannot be used to detect a retry. Retries of an event carry a byte-identical body. Rarely, for example after a Telemax restart, an event is delivered again later as a separate event with the same body. Several alert configurations of the same type that cover one vehicle and deliver to the same webhook each produce their own delivery, and nothing in the body identifies the configuration: when two of them fire on the same vehicle message with the same Data, for example because they have the same settings, their bodies are identical. To de-duplicate, use a hash of the raw body, not a short time window. A byte-identical body means the same vehicle, alert type, time and data.
Managing webhooks
Create
POST /v2/api/webhooks
List
GET /v2/api/webhooks
Get
GET /v2/api/webhooks/{id}
Update
PUT /v2/api/webhooks/{id}
Delete
DELETE /v2/api/webhooks/{id}
Link alert
POST /v2/api/webhooks/{id}/link-alert