Link alert to webhook (V2)
curl --request POST \
--url https://api.telemax.com.au/v2/api/webhooks/{id}/link-alert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"alertId": 103
}'import requests
url = "https://api.telemax.com.au/v2/api/webhooks/{id}/link-alert"
payload = { "alertId": 103 }
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({alertId: 103})
};
fetch('https://api.telemax.com.au/v2/api/webhooks/{id}/link-alert', 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/{id}/link-alert",
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([
'alertId' => 103
]),
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/{id}/link-alert"
payload := strings.NewReader("{\n \"alertId\": 103\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/{id}/link-alert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alertId\": 103\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/webhooks/{id}/link-alert")
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 \"alertId\": 103\n}"
response = http.request(request)
puts response.read_body{}
Webhooks
Link alert
Links an alert configuration to an existing webhook.
POST
/
v2
/
api
/
webhooks
/
{id}
/
link-alert
Link alert to webhook (V2)
curl --request POST \
--url https://api.telemax.com.au/v2/api/webhooks/{id}/link-alert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"alertId": 103
}'import requests
url = "https://api.telemax.com.au/v2/api/webhooks/{id}/link-alert"
payload = { "alertId": 103 }
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({alertId: 103})
};
fetch('https://api.telemax.com.au/v2/api/webhooks/{id}/link-alert', 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/{id}/link-alert",
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([
'alertId' => 103
]),
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/{id}/link-alert"
payload := strings.NewReader("{\n \"alertId\": 103\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/{id}/link-alert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alertId\": 103\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/webhooks/{id}/link-alert")
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 \"alertId\": 103\n}"
response = http.request(request)
puts response.read_body{}
Overview
Adds an alert configuration to an existing webhook’s subscription list. Idempotent — if the alert is already linked, the response is200 with no change. The webhook and the alert configuration can belong to the token’s company or a direct, non-cancelled sub-company (see Token scoping). A global webhook cannot have links: the response is 422.
Use this when you want to add alerts one at a time after creation, rather than updating the full alertIds list via PUT /v2/api/webhooks/{id}.
Rate limit: 4 req/s · 20/min · 600/hr · 14,400/day
Endpoint
POST /v2/api/webhooks/{id}/link-alert
Path parameters
integer
required
Webhook ID.
Request body
{
"alertId": 103
}
| Field | Type | Required | Description |
|---|---|---|---|
| alertId | integer | Yes | Alert configuration ID to link (from GET /v2/api/companies/{id}/alerts), of a type that can be linked (see Supported alert types) |
Response
200 OK — empty body on success.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 | Webhook or alert configuration not found, or not in your companies |
| 422 | The webhook is global, the alert is of a type that cannot be linked, or the webhook already has 50 linked alerts (maximum) |
curl -X POST "https://api.telemax.com.au/v2/api/webhooks/7/link-alert" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"alertId": 103}'
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.
Path Parameters
Body
application/json
Example:
103
Response
200 OK — Empty body. Alert linked successfully.
Was this page helpful?