curl --request PUT \
--url https://api.telemax.com.au/v2/api/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"alertIds": [
123
],
"isActive": true,
"isGlobal": false
}
'import requests
url = "https://api.telemax.com.au/v2/api/webhooks/{id}"
payload = {
"url": "<string>",
"alertIds": [123],
"isActive": True,
"isGlobal": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', alertIds: [123], isActive: true, isGlobal: false})
};
fetch('https://api.telemax.com.au/v2/api/webhooks/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'alertIds' => [
123
],
'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/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"alertIds\": [\n 123\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.telemax.com.au/v2/api/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"alertIds\": [\n 123\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"alertIds\": [\n 123\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}"
response = http.request(request)
puts response.read_bodyUpdate webhook
Replaces the URL, active state, global flag and linked alerts of a webhook.
curl --request PUT \
--url https://api.telemax.com.au/v2/api/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"alertIds": [
123
],
"isActive": true,
"isGlobal": false
}
'import requests
url = "https://api.telemax.com.au/v2/api/webhooks/{id}"
payload = {
"url": "<string>",
"alertIds": [123],
"isActive": True,
"isGlobal": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', alertIds: [123], isActive: true, isGlobal: false})
};
fetch('https://api.telemax.com.au/v2/api/webhooks/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'alertIds' => [
123
],
'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/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"alertIds\": [\n 123\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.telemax.com.au/v2/api/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"alertIds\": [\n 123\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"alertIds\": [\n 123\n ],\n \"isActive\": true,\n \"isGlobal\": false\n}"
response = http.request(request)
puts response.read_bodyOverview
Updates a webhook. The request body replaces the entire webhook configuration — include all fields you want to keep, not just the ones you are changing. Omitted fields take their defaults:isActive becomes true, so omitting it re-enables a disabled webhook, and isGlobal becomes false. The webhook can belong to the token’s company or a direct, non-cancelled sub-company (see Token scoping).
Endpoint
PUT /v2/api/webhooks/{id}
Path parameters
Request body
{
"url": "https://your-server.example.com/new-endpoint",
"alertIds": [101, 103],
"isActive": true,
"isGlobal": false
}
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Destination URL; the same rules as on Create webhook |
| alertIds | integer[] | Yes (unless isGlobal) | Alert configuration IDs to link, at most 50 distinct. They replace the current links. Each must belong to one of the token’s companies and be of a type that can be linked (see Supported alert types). Ignored when isGlobal is true |
| isActive | boolean | No | Enable or disable deliveries (default true: omitting it re-enables the webhook) |
| isGlobal | boolean | No | Enable global delivery (default false). Switching to global removes the existing links |
Response
200 OK —WebhookDto with the new values. warning is set when the linked alerts have different types, or to “Warning: Existing alert links were removed because the webhook is now global.” when a webhook that had links switches to global; otherwise it is 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 | Webhook or alert ID not found, or not in your companies |
| 422 | The request failed validation (as on Create webhook: 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 |
curl -X PUT "https://api.telemax.com.au/v2/api/webhooks/7" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-server.example.com/new-endpoint","alertIds":[101],"isActive":false,"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.
Path Parameters
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.
Alert configuration IDs to link, at most 50 distinct; they replace the current links. Required when isGlobal is false; ignored when it is true. Each must be of a type that can be linked (see the endpoint description).
Response
Successful response. warning is set when the linked alerts have different types, or when a webhook that had links switches to global and its links are removed.
Was this page helpful?