Update webhook
curl --request PUT \
--url https://api.timbrix.mx/organizations/{organizationId}/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks",
"events": [
"organization.created",
"organization.updated"
],
"isActive": true
}
'import requests
url = "https://api.timbrix.mx/organizations/{organizationId}/webhooks/{id}"
payload = {
"url": "https://example.com/webhooks",
"events": ["organization.created", "organization.updated"],
"isActive": True
}
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: 'https://example.com/webhooks',
events: ['organization.created', 'organization.updated'],
isActive: true
})
};
fetch('https://api.timbrix.mx/organizations/{organizationId}/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.timbrix.mx/organizations/{organizationId}/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' => 'https://example.com/webhooks',
'events' => [
'organization.created',
'organization.updated'
],
'isActive' => 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.timbrix.mx/organizations/{organizationId}/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"organization.created\",\n \"organization.updated\"\n ],\n \"isActive\": true\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.timbrix.mx/organizations/{organizationId}/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"organization.created\",\n \"organization.updated\"\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.timbrix.mx/organizations/{organizationId}/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\": \"https://example.com/webhooks\",\n \"events\": [\n \"organization.created\",\n \"organization.updated\"\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_bodyWebhooks
Update Webhook
Updates webhook configuration. Allows updating URL, events, and active status.
PUT
/
organizations
/
{organizationId}
/
webhooks
/
{id}
Update webhook
curl --request PUT \
--url https://api.timbrix.mx/organizations/{organizationId}/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks",
"events": [
"organization.created",
"organization.updated"
],
"isActive": true
}
'import requests
url = "https://api.timbrix.mx/organizations/{organizationId}/webhooks/{id}"
payload = {
"url": "https://example.com/webhooks",
"events": ["organization.created", "organization.updated"],
"isActive": True
}
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: 'https://example.com/webhooks',
events: ['organization.created', 'organization.updated'],
isActive: true
})
};
fetch('https://api.timbrix.mx/organizations/{organizationId}/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.timbrix.mx/organizations/{organizationId}/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' => 'https://example.com/webhooks',
'events' => [
'organization.created',
'organization.updated'
],
'isActive' => 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.timbrix.mx/organizations/{organizationId}/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"organization.created\",\n \"organization.updated\"\n ],\n \"isActive\": true\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.timbrix.mx/organizations/{organizationId}/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"organization.created\",\n \"organization.updated\"\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.timbrix.mx/organizations/{organizationId}/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\": \"https://example.com/webhooks\",\n \"events\": [\n \"organization.created\",\n \"organization.updated\"\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_bodyUpdates webhook configuration. Allows updating URL, events, and active status.
Authentication
This endpoint requires authentication via Bearer token:- Authorization:
Bearer <token>
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organizationId | string (UUID) | Yes | Organization ID |
id | string (UUID) | Yes | Webhook ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | No | Webhook endpoint URL |
events | array | No | Array of event types |
isActive | boolean | No | Enable/disable webhook |
Updatable Fields
- URL: Change webhook endpoint
- Events: Update subscribed events
- Active Status: Enable or disable webhook delivery
Permissions
Only OWNERS and ADMINS can update webhooks.Example Request
curl -X PUT https://api.timbrix.mx/organizations/550e8400-e29b-41d4-a716-446655440000/webhooks/123e4567-e89b-12d3-a456-426614174000 \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/new-webhook",
"events": ["organization.updated", "member.removed"],
"isActive": true
}'
Example Response
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/new-webhook",
"events": ["organization.updated", "member.removed"],
"isActive": true,
"createdAt": "2025-01-26T10:00:00Z",
"updatedAt": "2025-12-26T15:30:00Z"
}
Common Errors
400 Bad Request
Invalid input data.{
"statusCode": 400,
"message": ["url must be a valid URL", "events must be an array"]
}
401 Unauthorized
Authentication required.{
"statusCode": 401,
"message": "Authentication required. Provide a valid bearer token."
}
403 Forbidden
Only owners and admins can update webhooks.{
"statusCode": 403,
"message": "Access denied. Only owners and admins can update webhooks."
}
404 Not Found
Webhook not found.{
"statusCode": 404,
"message": "Webhook not found with the provided ID."
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Webhook updated successfully with new configuration.
⌘I