Skip to main content
Telemax webhooks push alert event payloads to a URL you control the moment an alert fires. No polling required.

How it works

  1. 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.
  2. Link one or more alert configurations to the webhook (via alertIds on creation, or later via POST /v2/api/webhooks/{id}/link-alert). Alternatively, set isGlobal: true to receive alerts from your company and all its sub-companies (see Global vs alert-scoped webhooks).
  3. When a linked alert fires, Telemax sends an HTTP POST to your URL with a signed JSON payload.
Webhook deliveries only start once Telemax has enabled webhook alerts for your company. Until then, creating a webhook and linking alerts both succeed, but nothing is sent. Contact Telemax support to have it enabled. For an alert-scoped webhook, the setting is checked on the company that owns the linked alert configuration; for a global webhook, on the company that owns the webhook.

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 ("Ignition")
Low battery ("LowBattery")
Maximum speed ("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 the 422 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 with Data: 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

Compute HMAC-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 a 2xx 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