json
{
"WebhookId": "WID-1234567",
"AccountId": "AID-1234567",
"WebhookUrl": "https://api.telegent.com/test",
"Method": "POST",
"DataFormat": "json",
"AuthenticationType": "Basic",
"AuthenticationUsername": "User",
"AuthenticationPassword": "pw",
"AuthenticationToken": "",
"SubscribedEvents": "Order_Update, New_SMS"
}curl -X POST https://api.telegent.com/v1.0/webhook/update \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"WebhookId": "WID-1234567",
"AccountId": "AID-1234567",
"WebhookUrl": "https://api.telegent.com/test",
"Method": "POST",
"DataFormat": "json",
"AuthenticationType": "Basic",
"AuthenticationUsername": "User",
"AuthenticationPassword": "pw",
"AuthenticationToken": "",
"SubscribedEvents": "Order_Update, New_SMS"
}'import requests
url = "https://api.telegent.com/v1.0/webhook/update"
payload = {
"AccountId": "<string>",
"WebhookUrl": "<string>",
"Method": "<string>",
"DataFormat": "<string>",
"AuthenticationType": "<string>",
"AuthenticationUsername": "<string>",
"AuthenticationPassword": "<string>",
"AuthenticationToken": "<string>",
"SubscribedEvents": "<string>",
"WebhookId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
AccountId: '<string>',
WebhookUrl: '<string>',
Method: '<string>',
DataFormat: '<string>',
AuthenticationType: '<string>',
AuthenticationUsername: '<string>',
AuthenticationPassword: '<string>',
AuthenticationToken: '<string>',
SubscribedEvents: '<string>',
WebhookId: '<string>'
})
};
fetch('https://api.telegent.com/v1.0/webhook/update', 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.telegent.com/v1.0/webhook/update",
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([
'AccountId' => '<string>',
'WebhookUrl' => '<string>',
'Method' => '<string>',
'DataFormat' => '<string>',
'AuthenticationType' => '<string>',
'AuthenticationUsername' => '<string>',
'AuthenticationPassword' => '<string>',
'AuthenticationToken' => '<string>',
'SubscribedEvents' => '<string>',
'WebhookId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.telegent.com/v1.0/webhook/update"
payload := strings.NewReader("{\n \"AccountId\": \"<string>\",\n \"WebhookUrl\": \"<string>\",\n \"Method\": \"<string>\",\n \"DataFormat\": \"<string>\",\n \"AuthenticationType\": \"<string>\",\n \"AuthenticationUsername\": \"<string>\",\n \"AuthenticationPassword\": \"<string>\",\n \"AuthenticationToken\": \"<string>\",\n \"SubscribedEvents\": \"<string>\",\n \"WebhookId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.telegent.com/v1.0/webhook/update")
.header("Content-Type", "application/json")
.body("{\n \"AccountId\": \"<string>\",\n \"WebhookUrl\": \"<string>\",\n \"Method\": \"<string>\",\n \"DataFormat\": \"<string>\",\n \"AuthenticationType\": \"<string>\",\n \"AuthenticationUsername\": \"<string>\",\n \"AuthenticationPassword\": \"<string>\",\n \"AuthenticationToken\": \"<string>\",\n \"SubscribedEvents\": \"<string>\",\n \"WebhookId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/webhook/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"AccountId\": \"<string>\",\n \"WebhookUrl\": \"<string>\",\n \"Method\": \"<string>\",\n \"DataFormat\": \"<string>\",\n \"AuthenticationType\": \"<string>\",\n \"AuthenticationUsername\": \"<string>\",\n \"AuthenticationPassword\": \"<string>\",\n \"AuthenticationToken\": \"<string>\",\n \"SubscribedEvents\": \"<string>\",\n \"WebhookId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"AccountId": "<string>",
"WebhookUrl": "<string>",
"Method": "<string>",
"DataFormat": "<string>",
"AuthenticationType": "<string>",
"AuthenticationUsername": "<string>",
"AuthenticationPassword": "<string>",
"AuthenticationToken": "<string>",
"SubscribedEvents": "<string>",
"WebhookId": "<string>",
"Active": true
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Webhooks
Update Webhook
Update the configuration of an existing webhook, including its destination URL, HTTP method, authentication credentials, and the list of subscribed events. Use this to rotate credentials, change the callback endpoint, or modify which events trigger notifications without recreating the webhook.
POST
/
v1.0
/
webhook
/
update
json
{
"WebhookId": "WID-1234567",
"AccountId": "AID-1234567",
"WebhookUrl": "https://api.telegent.com/test",
"Method": "POST",
"DataFormat": "json",
"AuthenticationType": "Basic",
"AuthenticationUsername": "User",
"AuthenticationPassword": "pw",
"AuthenticationToken": "",
"SubscribedEvents": "Order_Update, New_SMS"
}curl -X POST https://api.telegent.com/v1.0/webhook/update \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"WebhookId": "WID-1234567",
"AccountId": "AID-1234567",
"WebhookUrl": "https://api.telegent.com/test",
"Method": "POST",
"DataFormat": "json",
"AuthenticationType": "Basic",
"AuthenticationUsername": "User",
"AuthenticationPassword": "pw",
"AuthenticationToken": "",
"SubscribedEvents": "Order_Update, New_SMS"
}'import requests
url = "https://api.telegent.com/v1.0/webhook/update"
payload = {
"AccountId": "<string>",
"WebhookUrl": "<string>",
"Method": "<string>",
"DataFormat": "<string>",
"AuthenticationType": "<string>",
"AuthenticationUsername": "<string>",
"AuthenticationPassword": "<string>",
"AuthenticationToken": "<string>",
"SubscribedEvents": "<string>",
"WebhookId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
AccountId: '<string>',
WebhookUrl: '<string>',
Method: '<string>',
DataFormat: '<string>',
AuthenticationType: '<string>',
AuthenticationUsername: '<string>',
AuthenticationPassword: '<string>',
AuthenticationToken: '<string>',
SubscribedEvents: '<string>',
WebhookId: '<string>'
})
};
fetch('https://api.telegent.com/v1.0/webhook/update', 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.telegent.com/v1.0/webhook/update",
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([
'AccountId' => '<string>',
'WebhookUrl' => '<string>',
'Method' => '<string>',
'DataFormat' => '<string>',
'AuthenticationType' => '<string>',
'AuthenticationUsername' => '<string>',
'AuthenticationPassword' => '<string>',
'AuthenticationToken' => '<string>',
'SubscribedEvents' => '<string>',
'WebhookId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.telegent.com/v1.0/webhook/update"
payload := strings.NewReader("{\n \"AccountId\": \"<string>\",\n \"WebhookUrl\": \"<string>\",\n \"Method\": \"<string>\",\n \"DataFormat\": \"<string>\",\n \"AuthenticationType\": \"<string>\",\n \"AuthenticationUsername\": \"<string>\",\n \"AuthenticationPassword\": \"<string>\",\n \"AuthenticationToken\": \"<string>\",\n \"SubscribedEvents\": \"<string>\",\n \"WebhookId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.telegent.com/v1.0/webhook/update")
.header("Content-Type", "application/json")
.body("{\n \"AccountId\": \"<string>\",\n \"WebhookUrl\": \"<string>\",\n \"Method\": \"<string>\",\n \"DataFormat\": \"<string>\",\n \"AuthenticationType\": \"<string>\",\n \"AuthenticationUsername\": \"<string>\",\n \"AuthenticationPassword\": \"<string>\",\n \"AuthenticationToken\": \"<string>\",\n \"SubscribedEvents\": \"<string>\",\n \"WebhookId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/webhook/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"AccountId\": \"<string>\",\n \"WebhookUrl\": \"<string>\",\n \"Method\": \"<string>\",\n \"DataFormat\": \"<string>\",\n \"AuthenticationType\": \"<string>\",\n \"AuthenticationUsername\": \"<string>\",\n \"AuthenticationPassword\": \"<string>\",\n \"AuthenticationToken\": \"<string>\",\n \"SubscribedEvents\": \"<string>\",\n \"WebhookId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"AccountId": "<string>",
"WebhookUrl": "<string>",
"Method": "<string>",
"DataFormat": "<string>",
"AuthenticationType": "<string>",
"AuthenticationUsername": "<string>",
"AuthenticationPassword": "<string>",
"AuthenticationToken": "<string>",
"SubscribedEvents": "<string>",
"WebhookId": "<string>",
"Active": true
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Body
application/jsontext/jsonapplication/*+json
Update_Webhook_Request object
Response
Success