Create webhook (V2)
curl --request POST \
--url https://api.telemax.com.au/v2/api/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://your-server.example.com/telemax-webhook",
"alertIds": [
101,
102
],
"isActive": true,
"isGlobal": false
}
'import requests
url = "https://api.telemax.com.au/v2/api/webhooks"
payload = {
"url": "https://your-server.example.com/telemax-webhook",
"alertIds": [101, 102],
"isActive": True,
"isGlobal": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://your-server.example.com/telemax-webhook',
alertIds: [101, 102],
isActive: true,
isGlobal: false
})
};
fetch('https://api.telemax.com.au/v2/api/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telemax.com.au/v2/api/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://your-server.example.com/telemax-webhook',
'alertIds' => [
101,
102
],
'isActive' => true,
'isGlobal' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telemax.com.au/v2/api/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://your-server.example.com/telemax-webhook\",\n \"alertIds\": [\n 101,\n 102\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telemax.com.au/v2/api/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://your-server.example.com/telemax-webhook\",\n \"alertIds\": [\n 101,\n 102\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://your-server.example.com/telemax-webhook\",\n \"alertIds\": [\n 101,\n 102\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}"
response = http.request(request)
puts response.read_body{
"secret": "0ABFAA308801519BFA69ECBC050AACDD567D46B042C85CD08171E4F327E71981",
"id": 41,
"url": "https://webhook.site/qa-telemax-test1",
"alertIds": [],
"isActive": false,
"isGlobal": true,
"createdAt": "2026-05-29T10:33:21",
"warning": null
}{
"type": "AUTHENTICATION",
"code": "INVALID_CREDENTIALS",
"description": "The provided API key is invalid or does not exist.",
"requestId": "0HNLTALNU4DCO:00000004",
"docUrl": "https://docs.telemax.com.au/errors/invalid-credentials"
}{
"type": "AUTHORIZATION",
"code": "INVALID_SCOPE",
"description": "The provided token does not have permission to access this resource.",
"requestId": "50e5c5f7-ccae-4ab6-b070-56d6645ceb1e",
"docUrl": "https://docs.telemax.com.au/errors/invalid-scope"
}{
"type": "VALIDATION_ERROR",
"code": "INVALID_INPUT",
"description": "Alert 3631 has unsupported type 18. Supported types: DeviceDisconnected (1), DeviceReconnected (2), Geofence (5), Ignition (8), LowBattery (9), ExceedMaximumSpeed (10).",
"requestId": "0HNLTALNU4DDT:00000001",
"docUrl": "https://docs.telemax.com.au/errors/invalid-input"
}{
"type": "RATE_LIMIT",
"code": "RATE_LIMIT_EXCEEDED",
"description": "Too many requests. Please slow down.",
"requestId": "req_6d2f8b4a",
"docUrl": "https://docs.telemax.com.au/errors/rate-limit-exceeded"
}{
"type": "SERVER_ERROR",
"code": "INTERNAL_SERVER_ERROR",
"description": "An unexpected error occurred. Please try again later.",
"requestId": "req_1e5a3c7d",
"docUrl": "https://docs.telemax.com.au/errors/internal-server-error"
}Webhooks
Create webhook
Creates a new webhook and returns the HMAC signing secret.
POST
/
v2
/
api
/
webhooks
Create webhook (V2)
curl --request POST \
--url https://api.telemax.com.au/v2/api/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://your-server.example.com/telemax-webhook",
"alertIds": [
101,
102
],
"isActive": true,
"isGlobal": false
}
'import requests
url = "https://api.telemax.com.au/v2/api/webhooks"
payload = {
"url": "https://your-server.example.com/telemax-webhook",
"alertIds": [101, 102],
"isActive": True,
"isGlobal": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://your-server.example.com/telemax-webhook',
alertIds: [101, 102],
isActive: true,
isGlobal: false
})
};
fetch('https://api.telemax.com.au/v2/api/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telemax.com.au/v2/api/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://your-server.example.com/telemax-webhook',
'alertIds' => [
101,
102
],
'isActive' => true,
'isGlobal' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telemax.com.au/v2/api/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://your-server.example.com/telemax-webhook\",\n \"alertIds\": [\n 101,\n 102\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telemax.com.au/v2/api/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://your-server.example.com/telemax-webhook\",\n \"alertIds\": [\n 101,\n 102\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://your-server.example.com/telemax-webhook\",\n \"alertIds\": [\n 101,\n 102\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}"
response = http.request(request)
puts response.read_body{
"secret": "0ABFAA308801519BFA69ECBC050AACDD567D46B042C85CD08171E4F327E71981",
"id": 41,
"url": "https://webhook.site/qa-telemax-test1",
"alertIds": [],
"isActive": false,
"isGlobal": true,
"createdAt": "2026-05-29T10:33:21",
"warning": null
}{
"type": "AUTHENTICATION",
"code": "INVALID_CREDENTIALS",
"description": "The provided API key is invalid or does not exist.",
"requestId": "0HNLTALNU4DCO:00000004",
"docUrl": "https://docs.telemax.com.au/errors/invalid-credentials"
}{
"type": "AUTHORIZATION",
"code": "INVALID_SCOPE",
"description": "The provided token does not have permission to access this resource.",
"requestId": "50e5c5f7-ccae-4ab6-b070-56d6645ceb1e",
"docUrl": "https://docs.telemax.com.au/errors/invalid-scope"
}{
"type": "VALIDATION_ERROR",
"code": "INVALID_INPUT",
"description": "Alert 3631 has unsupported type 18. Supported types: DeviceDisconnected (1), DeviceReconnected (2), Geofence (5), Ignition (8), LowBattery (9), ExceedMaximumSpeed (10).",
"requestId": "0HNLTALNU4DDT:00000001",
"docUrl": "https://docs.telemax.com.au/errors/invalid-input"
}{
"type": "RATE_LIMIT",
"code": "RATE_LIMIT_EXCEEDED",
"description": "Too many requests. Please slow down.",
"requestId": "req_6d2f8b4a",
"docUrl": "https://docs.telemax.com.au/errors/rate-limit-exceeded"
}{
"type": "SERVER_ERROR",
"code": "INTERNAL_SERVER_ERROR",
"description": "An unexpected error occurred. Please try again later.",
"requestId": "req_1e5a3c7d",
"docUrl": "https://docs.telemax.com.au/errors/internal-server-error"
}Overview
Creates a webhook for the authenticated company. The plaintext HMAC signing secret is included in the response only on creation — it is never returned again. Store it securely.Rate limit: 4 req/s · 20/min · 600/hr · 14,400/day
Endpoint
POST /v2/api/webhooks
Request body
{
"url": "https://your-server.example.com/telemax-webhook",
"alertIds": [101, 102],
"isActive": true,
"isGlobal": false
}
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Destination URL (must be HTTPS; internal/private IPs rejected) |
| alertIds | integer[] | Yes (unless isGlobal) | Alert configuration IDs to link (from GET /v2/api/companies/{id}/alerts) |
| isActive | boolean | No | Whether deliveries are enabled (default true) |
| isGlobal | boolean | No | Fire for all company alerts regardless of alertIds (default false) |
Response
200 OK —CreateWebhookResponse (extends WebhookDto)
| Field | Type | Description |
|---|---|---|
| id | integer | Webhook ID |
| url | string | Destination URL |
| alertIds | integer[] | Linked alert configuration IDs |
| isActive | boolean | Whether the webhook is active |
| isGlobal | boolean | Whether global delivery is enabled |
| createdAt | datetime | UTC creation timestamp |
| secret | string | Plaintext HMAC-SHA256 signing secret — store it now, not returned again |
| warning | string | null | Set when linked alerts have different types (payloads will have different data shapes) |
Example response
{
"id": 7,
"url": "https://your-server.example.com/telemax-webhook",
"alertIds": [101],
"isActive": true,
"isGlobal": false,
"createdAt": "2026-04-28T07:00:00Z",
"secret": "a3f8e1b2c4d5...",
"warning": null
}
Error responses
| Status | Meaning |
|---|---|
| 401 | Missing or invalid token |
| 422 | Alert ID not found, unsupported alert type, or more than 50 alert IDs |
| 429 | Rate limit exceeded |
| 500 | Unexpected server error |
curl -X POST "https://api.telemax.com.au/v2/api/webhooks" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-server.example.com/hook","alertIds":[101],"isActive":true,"isGlobal":false}'
Authorizations
JWT Bearer token obtained from POST /v2/api/authentication/token/api-key.
Lifetime: ~24 hours (86,399 seconds). Cache the token and reuse it. Re-authenticate 5 minutes before expiry.
Scoping: API key tokens are scoped to the company the key belongs to and may restrict access to a vehicle allowlist and/or action set (see token claims).
No refresh endpoint — re-authenticate with your API key when the token expires.
Body
application/json
Example:
"https://your-server.example.com/telemax-webhook"
IDs of alerts to subscribe to. Must be of a supported type (see endpoint description). Required when isGlobal is false.
Example:
[101, 102]
Response
Successful response
Was this page helpful?
⌘I