Create Webhook
curl --request POST \
--url https://api.wirebox.sh/api/v1/webhooks \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
"<string>"
],
"agent": "<string>",
"auth_token": "<string>"
}
'import requests
url = "https://api.wirebox.sh/api/v1/webhooks"
payload = {
"url": "<string>",
"events": ["<string>"],
"agent": "<string>",
"auth_token": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
events: ['<string>'],
agent: '<string>',
auth_token: '<string>'
})
};
fetch('https://api.wirebox.sh/api/v1/webhooks', 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.wirebox.sh/api/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'events' => [
'<string>'
],
'agent' => '<string>',
'auth_token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.wirebox.sh/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"agent\": \"<string>\",\n \"auth_token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.wirebox.sh/api/v1/webhooks")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"agent\": \"<string>\",\n \"auth_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wirebox.sh/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"agent\": \"<string>\",\n \"auth_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "whk_01J8DEF456GHI789",
"url": "https://agent.example.com/api/webhooks",
"events": [
"message.received",
"message.delivered",
"message.bounced"
],
"agent_handle": "eva",
"auth_token": "bearer_secret_token_123",
"has_auth_token": true,
"secret": "whsec_7K9x2mP4qR8vT1wY3zA5bC6dE0fG1hJ2",
"created_at": "2026-09-11T10:00:00Z"
}
Webhooks
Create Webhook
Register an HTTPS endpoint to receive real-time event notifications.
POST
/
api
/
v1
/
webhooks
Create Webhook
curl --request POST \
--url https://api.wirebox.sh/api/v1/webhooks \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
"<string>"
],
"agent": "<string>",
"auth_token": "<string>"
}
'import requests
url = "https://api.wirebox.sh/api/v1/webhooks"
payload = {
"url": "<string>",
"events": ["<string>"],
"agent": "<string>",
"auth_token": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
events: ['<string>'],
agent: '<string>',
auth_token: '<string>'
})
};
fetch('https://api.wirebox.sh/api/v1/webhooks', 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.wirebox.sh/api/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'events' => [
'<string>'
],
'agent' => '<string>',
'auth_token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.wirebox.sh/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"agent\": \"<string>\",\n \"auth_token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.wirebox.sh/api/v1/webhooks")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"agent\": \"<string>\",\n \"auth_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wirebox.sh/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"agent\": \"<string>\",\n \"auth_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "whk_01J8DEF456GHI789",
"url": "https://agent.example.com/api/webhooks",
"events": [
"message.received",
"message.delivered",
"message.bounced"
],
"agent_handle": "eva",
"auth_token": "bearer_secret_token_123",
"has_auth_token": true,
"secret": "whsec_7K9x2mP4qR8vT1wY3zA5bC6dE0fG1hJ2",
"created_at": "2026-09-11T10:00:00Z"
}
Body Parameters
string
required
Target HTTPS destination URL (e.g.
https://agent.example.com/api/webhooks).string[]
required
Array of event types to subscribe to (e.g.
["message.received", "message.delivered", "message.bounced"]).string
Optional agent handle to scope events exclusively to this agent.
string
Optional custom bearer token (min 8 chars). When set, Wirebox will send
Authorization: Bearer <auth_token>.Response
Returns the webhook endpoint with its one-time HMAC signing secret.{
"id": "whk_01J8DEF456GHI789",
"url": "https://agent.example.com/api/webhooks",
"events": [
"message.received",
"message.delivered",
"message.bounced"
],
"agent_handle": "eva",
"auth_token": "bearer_secret_token_123",
"has_auth_token": true,
"secret": "whsec_7K9x2mP4qR8vT1wY3zA5bC6dE0fG1hJ2",
"created_at": "2026-09-11T10:00:00Z"
}