Delete webhook endpoint
curl --request DELETE \
--url https://api.tokenlab.sh/v1/management/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tokenlab.sh/v1/management/webhooks/{webhookId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tokenlab.sh/v1/management/webhooks/{webhookId}', 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.tokenlab.sh/v1/management/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tokenlab.sh/v1/management/webhooks/{webhookId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.tokenlab.sh/v1/management/webhooks/{webhookId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/management/webhooks/{webhookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "webhook_endpoint",
"deleted": true
}{
"error": {
"message": "model: Model is required",
"type": "invalid_request_error",
"param": "model"
},
"validation_errors": [
{
"field": "model",
"message": "Model is required"
}
]
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}{
"error": {
"message": "Organization is not active",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}Management
Delete webhook endpoint
Requires a workspace Management Token (mt-…), created at Dashboard > API > Management Tokens. Send Authorization: Bearer mt-… Inference API keys (sk-…) and webhook signing secrets (whsec_…) are not accepted. Only the token workspace is accessible.
DELETE
/
v1
/
management
/
webhooks
/
{webhookId}
Delete webhook endpoint
curl --request DELETE \
--url https://api.tokenlab.sh/v1/management/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tokenlab.sh/v1/management/webhooks/{webhookId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tokenlab.sh/v1/management/webhooks/{webhookId}', 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.tokenlab.sh/v1/management/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tokenlab.sh/v1/management/webhooks/{webhookId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.tokenlab.sh/v1/management/webhooks/{webhookId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/management/webhooks/{webhookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "webhook_endpoint",
"deleted": true
}{
"error": {
"message": "model: Model is required",
"type": "invalid_request_error",
"param": "model"
},
"validation_errors": [
{
"field": "model",
"message": "Model is required"
}
]
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}{
"error": {
"message": "Organization is not active",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}Use a workspace Management Token (
mt-...), not an inference API key (sk-...) or signing secret (whsec_...). Create one at Dashboard → API → Management Tokens and send Authorization: Bearer mt-.... Access is scoped to that workspace.
See Webhook management API guide for events, verification, retries and troubleshooting.Authorizations
Management token authentication. Create or manage Management Tokens in Dashboard > API > Management Tokens.
Path Parameters
Required string length:
1 - 128