Update a webhook endpoint
curl --request PATCH \
--url https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"eventTypes": [],
"includeAiGenerated": true
}
'import requests
url = "https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}"
payload = {
"url": "<string>",
"description": "<string>",
"eventTypes": [],
"includeAiGenerated": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
description: '<string>',
eventTypes: [],
includeAiGenerated: true
})
};
fetch('https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}', 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.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'description' => '<string>',
'eventTypes' => [
],
'includeAiGenerated' => true
]),
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.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [],\n \"includeAiGenerated\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [],\n \"includeAiGenerated\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [],\n \"includeAiGenerated\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"endpoint": {
"id": "9f2c…",
"url": "https://example.com/webhooks/textsetu",
"description": "<string>",
"eventTypes": [
"translation_key.created",
"branch.merged"
],
"status": "enabled",
"secretPrefix": "whsec_a1b2c3",
"includeAiGenerated": true,
"consecutiveFailures": 123,
"lastSuccessAt": "<string>",
"lastFailureAt": "<string>",
"lastError": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}Webhooks
Update a webhook endpoint
Change the URL, description, event subscription, or enabled state. The signing secret is untouched — use the rotate endpoint for that.
Constraints:
- Setting
statustoenabledalso clears the consecutive-failure count, giving a repaired endpoint a full retry budget again.
PATCH
/
projects
/
{projectId}
/
webhooks
/
{endpointId}
Update a webhook endpoint
curl --request PATCH \
--url https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"eventTypes": [],
"includeAiGenerated": true
}
'import requests
url = "https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}"
payload = {
"url": "<string>",
"description": "<string>",
"eventTypes": [],
"includeAiGenerated": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
description: '<string>',
eventTypes: [],
includeAiGenerated: true
})
};
fetch('https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}', 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.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'description' => '<string>',
'eventTypes' => [
],
'includeAiGenerated' => true
]),
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.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [],\n \"includeAiGenerated\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [],\n \"includeAiGenerated\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.textsetu.com/api/v1/projects/{projectId}/webhooks/{endpointId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"eventTypes\": [],\n \"includeAiGenerated\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"endpoint": {
"id": "9f2c…",
"url": "https://example.com/webhooks/textsetu",
"description": "<string>",
"eventTypes": [
"translation_key.created",
"branch.merged"
],
"status": "enabled",
"secretPrefix": "whsec_a1b2c3",
"includeAiGenerated": true,
"consecutiveFailures": 123,
"lastSuccessAt": "<string>",
"lastFailureAt": "<string>",
"lastError": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}Authorizations
API token: tsu_pat_… (PAT) or tsu_proj_… (project token). The token's granted RBAC permissions determine access; see each operation's x-permission.
Path Parameters
Project id (UUID) or id-embedded path slug.
Body
application/json
Required string length:
1 - 2048Maximum string length:
500Required array length:
1 - 10 elementsAvailable options:
translation_key.created, translation_key.updated, translation_key.deleted, translation_value.updated, branch.created, branch.merged, import.completed, export.completed, language.added, language.removed Available options:
enabled, disabled 
