curl -X POST https://api.wirebox.sh/api/v1/webhooks \
-H "Authorization: Bearer $WIREBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://agent.example.com/api/webhooks",
"events": ["email.received", "email.sent", "sms.received"],
"agent": "eva"
}'
from wirebox import Wirebox
with Wirebox() as wirebox:
webhook = wirebox.webhooks.create(
url="https://agent.example.com/api/webhooks",
events=["email.received", "email.sent", "sms.received"],
agent="eva"
)
print(f"Created webhook: {webhook.id}")
import { Wirebox } from "@wirebox-sh/sdk";
const wirebox = new Wirebox();
const webhook = await wirebox.webhooks.create({
url: "https://agent.example.com/api/webhooks",
events: ["email.received", "email.sent", "sms.received"],
agent: "eva",
});
console.log(`Created webhook: ${webhook.id}`);
wirebox webhook create \
--url https://agent.example.com/api/webhooks \
--events email.received,email.sent,sms.received \
--agent eva
{
"id": "whk_01J8DEF456GHI789",
"agent_handle": "eva",
"mailbox_address": "eva@wireboxmail.com",
"url": "https://agent.example.com/api/webhooks",
"events": [
"email.received",
"email.sent",
"sms.received"
],
"auth_token": "bearer_secret_token_123",
"has_auth_token": true,
"status": "active",
"secret": "whsec_7K9x2mP4qR8vT1wY3zA5bC6dE0fG1hJ2",
"created_at": "2026-09-11T10:00:00Z",
"updated_at": "2026-09-11T10:00:00Z"
}
Webhooks
Create Webhook
Register an HTTPS endpoint to receive real-time event notifications.
POST
/
api
/
v1
/
webhooks
curl -X POST https://api.wirebox.sh/api/v1/webhooks \
-H "Authorization: Bearer $WIREBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://agent.example.com/api/webhooks",
"events": ["email.received", "email.sent", "sms.received"],
"agent": "eva"
}'
from wirebox import Wirebox
with Wirebox() as wirebox:
webhook = wirebox.webhooks.create(
url="https://agent.example.com/api/webhooks",
events=["email.received", "email.sent", "sms.received"],
agent="eva"
)
print(f"Created webhook: {webhook.id}")
import { Wirebox } from "@wirebox-sh/sdk";
const wirebox = new Wirebox();
const webhook = await wirebox.webhooks.create({
url: "https://agent.example.com/api/webhooks",
events: ["email.received", "email.sent", "sms.received"],
agent: "eva",
});
console.log(`Created webhook: ${webhook.id}`);
wirebox webhook create \
--url https://agent.example.com/api/webhooks \
--events email.received,email.sent,sms.received \
--agent eva
{
"id": "whk_01J8DEF456GHI789",
"agent_handle": "eva",
"mailbox_address": "eva@wireboxmail.com",
"url": "https://agent.example.com/api/webhooks",
"events": [
"email.received",
"email.sent",
"sms.received"
],
"auth_token": "bearer_secret_token_123",
"has_auth_token": true,
"status": "active",
"secret": "whsec_7K9x2mP4qR8vT1wY3zA5bC6dE0fG1hJ2",
"created_at": "2026-09-11T10:00:00Z",
"updated_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.
["email.received", "email.sent", "sms.received"]).string
Optional agent handle to scope events exclusively to this agent.
string
Optional mailbox address to scope events to a single mailbox.
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.curl -X POST https://api.wirebox.sh/api/v1/webhooks \
-H "Authorization: Bearer $WIREBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://agent.example.com/api/webhooks",
"events": ["email.received", "email.sent", "sms.received"],
"agent": "eva"
}'
from wirebox import Wirebox
with Wirebox() as wirebox:
webhook = wirebox.webhooks.create(
url="https://agent.example.com/api/webhooks",
events=["email.received", "email.sent", "sms.received"],
agent="eva"
)
print(f"Created webhook: {webhook.id}")
import { Wirebox } from "@wirebox-sh/sdk";
const wirebox = new Wirebox();
const webhook = await wirebox.webhooks.create({
url: "https://agent.example.com/api/webhooks",
events: ["email.received", "email.sent", "sms.received"],
agent: "eva",
});
console.log(`Created webhook: ${webhook.id}`);
wirebox webhook create \
--url https://agent.example.com/api/webhooks \
--events email.received,email.sent,sms.received \
--agent eva
{
"id": "whk_01J8DEF456GHI789",
"agent_handle": "eva",
"mailbox_address": "eva@wireboxmail.com",
"url": "https://agent.example.com/api/webhooks",
"events": [
"email.received",
"email.sent",
"sms.received"
],
"auth_token": "bearer_secret_token_123",
"has_auth_token": true,
"status": "active",
"secret": "whsec_7K9x2mP4qR8vT1wY3zA5bC6dE0fG1hJ2",
"created_at": "2026-09-11T10:00:00Z",
"updated_at": "2026-09-11T10:00:00Z"
}