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>"
}
]
}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>"
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
ID of the webhook to change. Get it from List Superagent webhooks.
ID of the Superagent. It's the agent's app ID, shown in the agent's developer settings.
Body
New public HTTPS URL that receives the events.
"https://example.com/hooks/agent-v2"
New set of events to receive. One or more of message.created and message.completed.
["message.created", "message.completed"]
New label for the webhook, or null to remove it.
"CRM sync"
true turns the webhook back on and resets consecutive_failures. false turns it off.
true
rotate generates a new signing secret and returns it once in secret. disable removes the secret, so deliveries are no longer signed.
"rotate"
Response
The updated webhook.
A webhook subscription, with its signing secret when one was just generated.
ID of the webhook.
"68a1d0f4f0b9d3002e7a5c52"
HTTPS URL Base44 sends the events to.
"https://example.com/hooks/agent"
Events the webhook receives. message.created fires when a message is added to a conversation, and message.completed when the agent finishes a reply.
message.created, message.completed ["message.completed"]
Your label for the webhook, or null when it has none.
"CRM sync"
Whether deliveries are signed. When true, each delivery carries an X-Base44-Signature header, an HMAC-SHA256 of the body.
true
Time of the last delivery attempt, successful or not, as a UTC timestamp in ISO 8601 format, or null before the first one.
"2026-08-02T14:30:00Z"
What went wrong on the last failed delivery, or null when the last delivery succeeded or none has failed.
Show child attributes
Show child attributes
Deliveries that failed in a row. After 20, Base44 turns the webhook off and sets disabled_at.
0
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"
Time the webhook was created, as a UTC timestamp in ISO 8601 format.
"2026-08-01T09:15:00Z"
Time the webhook last changed, as a UTC timestamp in ISO 8601 format.
"2026-08-02T14:30:00Z"
The signing secret, returned only in the response that generates it. Store it, because no other response shows it again.
"Rk3x9QeN0vZ8bL2mT6yH4cJ1wP7sD5fG0aX9kV3uE8o"
Was this page helpful?