Documentation
DocsAPI ReferenceWebhooks API
Webhooks API
GET
/v1/webhooks/endpointsList 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/endpointsCreate a webhook endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | HTTPS URL to receive webhook payloads |
| subscribedEvents | string[] | Yes | Event 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/:endpointIdGet endpoint details and error rate.
TypeScript
const ep = await client.getWebhookEndpoint("whk_abc");
console.log(ep.status); // "healthy"
console.log(ep.errorRate); // 0.02curl
curl https://api.outreachagent.dev/v1/webhooks/endpoints/whk_abc \ -H "Authorization: Bearer $OUTREACHAGENT_API_KEY"
PATCH
/v1/webhooks/endpoints/:endpointIdUpdate 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/:endpointIdRemove 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/deliveriesList 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/eventsList canonical events.
TypeScript
const events = await client.listEvents();
curl
curl https://api.outreachagent.dev/v1/events \ -H "Authorization: Bearer $OUTREACHAGENT_API_KEY"