curl --request PATCH \
--url https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_url": "https://example.com/hooks/agent-v2",
"events": [
"message.created",
"message.completed"
],
"description": "CRM sync",
"enabled": true,
"signing": "rotate"
}
'import requests
url = "https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}"
payload = {
"target_url": "https://example.com/hooks/agent-v2",
"events": ["message.created", "message.completed"],
"description": "CRM sync",
"enabled": True,
"signing": "rotate"
}
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({
target_url: 'https://example.com/hooks/agent-v2',
events: ['message.created', 'message.completed'],
description: 'CRM sync',
enabled: true,
signing: 'rotate'
})
};
fetch('https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_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://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}",
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([
'target_url' => 'https://example.com/hooks/agent-v2',
'events' => [
'message.created',
'message.completed'
],
'description' => 'CRM sync',
'enabled' => true,
'signing' => 'rotate'
]),
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://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}"
payload := strings.NewReader("{\n \"target_url\": \"https://example.com/hooks/agent-v2\",\n \"events\": [\n \"message.created\",\n \"message.completed\"\n ],\n \"description\": \"CRM sync\",\n \"enabled\": true,\n \"signing\": \"rotate\"\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://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target_url\": \"https://example.com/hooks/agent-v2\",\n \"events\": [\n \"message.created\",\n \"message.completed\"\n ],\n \"description\": \"CRM sync\",\n \"enabled\": true,\n \"signing\": \"rotate\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}")
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 \"target_url\": \"https://example.com/hooks/agent-v2\",\n \"events\": [\n \"message.created\",\n \"message.completed\"\n ],\n \"description\": \"CRM sync\",\n \"enabled\": true,\n \"signing\": \"rotate\"\n}"
response = http.request(request)
puts response.read_body{
"id": "68a1d0f4f0b9d3002e7a5c52",
"target_url": "https://example.com/hooks/agent",
"events": [
"message.completed"
],
"description": "CRM sync",
"has_secret": true,
"last_trigger_time": "2026-08-02T14:30:00Z",
"last_error": {
"message": "Non-2xx response: 500",
"attempted_at": "2026-08-02T14:30:00+00:00",
"status_code": 500,
"response_body": "Internal Server Error",
"error_type": "ConnectTimeout"
},
"consecutive_failures": 0,
"disabled_at": "2026-08-03T08:00:00Z",
"created_date": "2026-08-01T09:15:00Z",
"updated_date": "2026-08-02T14:30:00Z",
"secret": "Rk3x9QeN0vZ8bL2mT6yH4cJ1wP7sD5fG0aX9kV3uE8o"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"code": "database_unavailable",
"message": "Database temporarily unavailable, please retry",
"details": {}
}
}Update Superagent webhook
Changes a Superagent’s webhook.
Send only the fields you want to change. Send description: null to remove the label. events takes one or more of message.created, which fires when a message is added to a conversation, and message.completed, which fires when the agent finishes a reply. target_url has to be a public HTTPS URL.
enabled: true turns a webhook back on after Base44 turned it off for failing, and resets consecutive_failures. enabled: false turns it off. signing: "rotate" generates a new signing secret and returns it once in secret, and signing: "disable" stops signing deliveries.
curl --request PATCH \
--url https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_url": "https://example.com/hooks/agent-v2",
"events": [
"message.created",
"message.completed"
],
"description": "CRM sync",
"enabled": true,
"signing": "rotate"
}
'import requests
url = "https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}"
payload = {
"target_url": "https://example.com/hooks/agent-v2",
"events": ["message.created", "message.completed"],
"description": "CRM sync",
"enabled": True,
"signing": "rotate"
}
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({
target_url: 'https://example.com/hooks/agent-v2',
events: ['message.created', 'message.completed'],
description: 'CRM sync',
enabled: true,
signing: 'rotate'
})
};
fetch('https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_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://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}",
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([
'target_url' => 'https://example.com/hooks/agent-v2',
'events' => [
'message.created',
'message.completed'
],
'description' => 'CRM sync',
'enabled' => true,
'signing' => 'rotate'
]),
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://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}"
payload := strings.NewReader("{\n \"target_url\": \"https://example.com/hooks/agent-v2\",\n \"events\": [\n \"message.created\",\n \"message.completed\"\n ],\n \"description\": \"CRM sync\",\n \"enabled\": true,\n \"signing\": \"rotate\"\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://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target_url\": \"https://example.com/hooks/agent-v2\",\n \"events\": [\n \"message.created\",\n \"message.completed\"\n ],\n \"description\": \"CRM sync\",\n \"enabled\": true,\n \"signing\": \"rotate\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}")
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 \"target_url\": \"https://example.com/hooks/agent-v2\",\n \"events\": [\n \"message.created\",\n \"message.completed\"\n ],\n \"description\": \"CRM sync\",\n \"enabled\": true,\n \"signing\": \"rotate\"\n}"
response = http.request(request)
puts response.read_body{
"id": "68a1d0f4f0b9d3002e7a5c52",
"target_url": "https://example.com/hooks/agent",
"events": [
"message.completed"
],
"description": "CRM sync",
"has_secret": true,
"last_trigger_time": "2026-08-02T14:30:00Z",
"last_error": {
"message": "Non-2xx response: 500",
"attempted_at": "2026-08-02T14:30:00+00:00",
"status_code": 500,
"response_body": "Internal Server Error",
"error_type": "ConnectTimeout"
},
"consecutive_failures": 0,
"disabled_at": "2026-08-03T08:00:00Z",
"created_date": "2026-08-01T09:15:00Z",
"updated_date": "2026-08-02T14:30:00Z",
"secret": "Rk3x9QeN0vZ8bL2mT6yH4cJ1wP7sD5fG0aX9kV3uE8o"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"code": "database_unavailable",
"message": "Database temporarily unavailable, please retry",
"details": {}
}
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Path Parameters
ID of the webhook to change. Get it from List Superagent webhooks.
Body
Response
The updated webhook.
A webhook subscription, with its signing secret when one was just generated.
Time the webhook was turned off, as a UTC timestamp in ISO 8601 format, or null while it's on. Turn it back on with enabled: true in Update Superagent webhook.
"2026-08-03T08:00:00Z"
Was this page helpful?