Skip to main content
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

Update_Webhook_Request object

AccountId
string | null

Your Telegent account identifier (prefixed AID-). Max 100 characters.

Maximum string length: 100
WebhookUrl
string | null

The destination URL that Telegent will call when a subscribed event fires. Must be a reachable HTTPS endpoint, max 255 characters.

Maximum string length: 255
Method
string | null

HTTP method used to deliver the webhook payload, typically POST or PUT. Max 10 characters.

Maximum string length: 10
DataFormat
string | null

Payload format for the webhook body, e.g. json or xml. Max 50 characters.

Maximum string length: 50
AuthenticationType
string | null

Authentication scheme used when calling your endpoint. Supported values include Basic, Bearer, or None. Max 10 characters.

Maximum string length: 10
AuthenticationUsername
string | null

Username used when AuthenticationType is Basic. Max 255 characters.

Maximum string length: 255
AuthenticationPassword
string | null

Password used when AuthenticationType is Basic. Max 255 characters.

Maximum string length: 255
AuthenticationToken
string | null

Bearer token or API key used when AuthenticationType is Bearer. Max 255 characters.

Maximum string length: 255
SubscribedEvents
string | null

Comma-separated list of event names this webhook should receive (e.g. Order_Update, New_SMS). Max 255 characters.

Maximum string length: 255
WebhookId
string | null

Identifier of the webhook to update (prefixed WID-). Required to locate the existing record.

Response

Success

AccountId
string | null
Maximum string length: 100
WebhookUrl
string | null
Maximum string length: 255
Method
string | null
Maximum string length: 10
DataFormat
string | null
Maximum string length: 50
AuthenticationType
string | null
Maximum string length: 10
AuthenticationUsername
string | null
Maximum string length: 255
AuthenticationPassword
string | null
Maximum string length: 255
AuthenticationToken
string | null
Maximum string length: 255
SubscribedEvents
string | null
Maximum string length: 255
WebhookId
string | null
Active
boolean | null