Documentation

DocsAPI ReferenceWebhooks API

Webhooks API

GET/v1/webhooks/endpoints

List webhook endpoints.

TypeScript
const endpoints = await client.listWebhookEndpoints();
curl
curl https://api.outreachagent.dev/v1/webhooks/endpoints \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY"
POST/v1/webhooks/endpoints

Create a webhook endpoint.

ParameterTypeRequiredDescription
urlstringYesHTTPS URL to receive webhook payloads
subscribedEventsstring[]YesEvent types to subscribe to
TypeScript
const endpoint = await client.createWebhookEndpoint({
  url: "https://your-server.com/webhooks",
  subscribedEvents: ["message.received", "message.bounced"]
});
curl
curl -X POST https://api.outreachagent.dev/v1/webhooks/endpoints \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://your-server.com/webhooks","subscribedEvents":["message.received"]}'
GET/v1/webhooks/endpoints/:endpointId

Get endpoint details and error rate.

TypeScript
const ep = await client.getWebhookEndpoint("whk_abc");
console.log(ep.status);    // "healthy"
console.log(ep.errorRate); // 0.02
curl
curl https://api.outreachagent.dev/v1/webhooks/endpoints/whk_abc \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY"
PATCH/v1/webhooks/endpoints/:endpointId

Update URL or subscribed events.

TypeScript
await client.updateWebhookEndpoint("whk_abc", {
  subscribedEvents: ["message.received", "message.delivered", "message.bounced"]
});
curl
curl -X PATCH https://api.outreachagent.dev/v1/webhooks/endpoints/whk_abc \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subscribedEvents":["message.received","message.delivered"]}'
DELETE/v1/webhooks/endpoints/:endpointId

Remove a webhook endpoint.

TypeScript
await client.deleteWebhookEndpoint("whk_abc");
curl
curl -X DELETE https://api.outreachagent.dev/v1/webhooks/endpoints/whk_abc \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY"

GET/v1/webhooks/deliveries

List webhook delivery attempts.

TypeScript
const deliveries = await client.listWebhookDeliveries();
curl
curl https://api.outreachagent.dev/v1/webhooks/deliveries \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY"
GET/v1/events

List canonical events.

TypeScript
const events = await client.listEvents();
curl
curl https://api.outreachagent.dev/v1/events \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY"