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_bodyCreate webhook
Creates a new webhook and returns the HMAC signing secret.
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_bodyOverview
Creates a webhook owned by the token’s company. The plaintext HMAC signing secret is included in the response only on creation — it is never returned again. Store it securely, exactly as returned: it is 64 uppercase hexadecimal characters, and the signing key is that exact string, so its case matters (see Verifying the signature).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, http or https. The host must be a domain name containing a dot, or an IP address. It is refused if it does not resolve, or if any address it resolves to is loopback, private, CGNAT, link-local or multicast, in 0.0.0.0/8 or 240.0.0.0/4, the IPv6 unspecified address ::, or an IPv6 unique-local, 6to4 or Teredo address. A value that cannot be parsed as a URL is not always refused: it can be accepted, and nothing is ever delivered to it, so check the URL before you send it |
| alertIds | integer[] | Yes (unless isGlobal) | Alert configuration IDs to link (from GET /v2/api/companies/{id}/alerts), at most 50 distinct. Each must belong to one of the token’s companies (see Token scoping) and be of a type that can be linked (see Supported alert types). Ignored when isGlobal is true |
| isActive | boolean | No | Whether deliveries are enabled (default true) |
| isGlobal | boolean | No | Receive alerts without linking them; see Global vs alert-scoped webhooks for which alerts that covers. alertIds is then ignored and the response has 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 time, without a Z suffix |
| secret | string | Plaintext HMAC-SHA256 signing secret, 64 uppercase hexadecimal characters — store it now, not returned again |
| warning | string | null | Set when the linked alerts have different types, so their payloads can differ; otherwise null |
Example response
{
"id": 7,
"url": "https://your-server.example.com/telemax-webhook",
"alertIds": [101],
"isActive": true,
"isGlobal": false,
"createdAt": "2026-04-28T07:00:00",
"secret": "7E3A91C04B5D28F6A0C9E1B7D3F45A86C2E0B9D17F4A3C68E5B21D09A7F3C4E6",
"warning": null
}
Error responses
| Status | Meaning |
|---|---|
| 401 | Missing, invalid or expired bearer token (INVALID_CREDENTIALS) |
| 403 | The API key lacks this endpoint’s permission (INVALID_SCOPE), or the company is suspended (CompanySuspended) — see 403 Forbidden |
| 404 | An alert ID is unknown, deleted, or not in your companies |
| 422 | The request failed validation (a missing url or one the url rules refuse, or an empty alertIds while isGlobal is false; these return the shared description, see 422 Unprocessable Entity), an alert is of a type that cannot be linked, or there are more than 50 distinct 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 by the key's company and its action set; see Token scoping.
No refresh endpoint — re-authenticate with your API key when the token expires.
Body
http or https. The host must contain a dot or be an IP address, must resolve, and must not resolve to a loopback, private, CGNAT, link-local or multicast address, to 0.0.0.0/8 or 240.0.0.0/4, to ::, or to an IPv6 unique-local, 6to4 or Teredo address; otherwise the response is 422. A value that cannot be parsed as a URL is not always refused: it can be accepted, and nothing is ever delivered to it.
"https://your-server.example.com/telemax-webhook"
Alert configuration IDs to link, at most 50 distinct. Required when isGlobal is false; ignored when it is true. Each must be of a type that can be linked (see the endpoint description).
[101, 102]
Response
Successful response. warning is set when the linked alerts have different types.
Was this page helpful?