curl --request POST \
--url https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test', 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}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test"
req, _ := http.NewRequest("POST", 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.post("https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"status_code": 200,
"response_body": "ok",
"error": "ConnectTimeout: timed out"
}Test Superagent webhook
Sends a sample message.completed delivery to a Superagent’s webhook, so you can check your endpoint.
The delivery is signed when the webhook has a secret, and carries a unique X-Base44-Delivery header. A successful call means the test ran, not that your endpoint accepted it. Read ok for that. A failed test doesn’t count toward consecutive_failures.
Base44 waits up to 10 seconds for your endpoint to answer.
curl --request POST \
--url https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test', 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}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test"
req, _ := http.NewRequest("POST", 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.post("https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/agents/{agent_id}/webhooks/{webhook_id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"status_code": 200,
"response_body": "ok",
"error": "ConnectTimeout: timed out"
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
ID of the webhook to test. Get it from List Superagent webhooks.
ID of the Superagent. It's the agent's app ID, shown in the agent's developer settings.
Response
How your endpoint answered the test.
The outcome of a test delivery.
Whether your endpoint answered with a 2xx status.
true
HTTP status your endpoint answered with. Present only when it answered.
200
Start of your endpoint's response body, up to 1,024 bytes. Present only when it answered.
"ok"
Why the delivery didn't get an answer, such as a timeout or a URL Base44 refuses to call. Present only when it didn't.
"ConnectTimeout: timed out"
Was this page helpful?