Webhook endpoints
Register HTTPS endpoints for event notifications, rotate signing secrets, send test events and inspect delivery history.
A webhook endpoint is an HTTPS URL Ody POSTs signed events to. This page covers managing endpoints. For what gets delivered and how to verify it, see Webhooks, Event types and Verifying signatures.
The same endpoints are managed in the Ody app under Build → Webhooks, which adds an event picker, the body of each delivery and a Resend button (overview). There's no MCP tool for webhooks yet.
#The webhook endpoint object
iduuidurlstring — HTTPS only, and it must resolve to a public address (URL rules).eventsarray of strings — Subscribed event types, or["*"]for every current and future type.labelstring | null — Your own name for it.status"enabled" | "disabled"apiVersionstring | null — The payload version pinned when the endpoint was created.createdAttimestampfailingSincetimestamp | null — When deliveries started failing with no success since.nullwhile the endpoint is healthy; any successful delivery clears it.disabledReason"failing" | null —"failing"when Ody switched the endpoint off after 3 days without a successful delivery (details).nullwhen it is enabled or when you disabled it.disabledAttimestamp | null — When the endpoint was disabled, by you or by Ody (disabledReasonsays which).nullwhile it is enabled.secretstring —whsec_…signing secret. Returned only by create and rotate. Store it right away.
A workspace can have up to 50 endpoints.
#List event types
/v1/api/webhook-eventsReturns the catalog of event types you can subscribe to.
Scope: webhooks:manage
Returns { events: string[] }.
curl https://api.ody.co/v1/api/webhook-events \
-H "Authorization: Bearer $ODY_API_KEY"const types = await ody.webhooks.eventTypes();types = client.webhooks.event_types()#List endpoints
/v1/api/webhooksSecrets are never included.
Scope: webhooks:manage
Returns { webhooks: WebhookEndpoint[] }.
curl https://api.ody.co/v1/api/webhooks \
-H "Authorization: Bearer $ODY_API_KEY"const endpoints = await ody.webhooks.list();endpoints = client.webhooks.list()#Create an endpoint
/v1/api/webhooksScope: webhooks:manage
Body
urlstring required — Public HTTPS URL. A URL that resolves tolocalhost, a private network or a metadata address is refused with400.eventsarray of strings required — Event types, or["*"].labelstring
Returns 201 with { webhook }, including secret. Returns 400 for a non-HTTPS URL, a URL that doesn't resolve to a public address, an unknown event type, or when you'd exceed 50 endpoints.
curl https://api.ody.co/v1/api/webhooks \
-H "Authorization: Bearer $ODY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/ody/webhooks",
"events": ["message.received", "call.completed", "call.summary.completed"],
"label": "Production CRM sync"
}'const endpoint = await ody.webhooks.create({
url: "https://example.com/ody/webhooks",
events: ["message.received", "call.completed", "call.summary.completed"],
label: "Production CRM sync",
});
console.log(endpoint.secret); // whsec_… store it nowendpoint = client.webhooks.create(
url="https://example.com/ody/webhooks",
events=["message.received", "call.completed", "call.summary.completed"],
label="Production CRM sync",
){
"webhook": {
"id": "3a8f…",
"url": "https://example.com/ody/webhooks",
"events": ["message.received", "call.completed", "call.summary.completed"],
"label": "Production CRM sync",
"status": "enabled",
"apiVersion": "2026-06-01",
"createdAt": "2026-10-14T18:20:00.000Z",
"failingSince": null,
"disabledReason": null,
"disabledAt": null,
"secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
}
}#Retrieve an endpoint
/v1/api/webhooks/:idScope: webhooks:manage
Returns { webhook } (without the secret).
curl https://api.ody.co/v1/api/webhooks/3a8f… \
-H "Authorization: Bearer $ODY_API_KEY"const endpoint = await ody.webhooks.get("3a8f…");endpoint = client.webhooks.get("3a8f…")#Update an endpoint
/v1/api/webhooks/:idChange the URL, subscriptions or label, or pause deliveries with status: "disabled". Setting status: "enabled" turns an endpoint back on, including one Ody switched off; it also clears failingSince, disabledReason and disabledAt.
Scope: webhooks:manage
Body: any of url, events, label (null clears it), status.
Returns { webhook }.
curl -X PATCH https://api.ody.co/v1/api/webhooks/3a8f… \
-H "Authorization: Bearer $ODY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"disabled"}'await ody.webhooks.update("3a8f…", { status: "disabled" });client.webhooks.update("3a8f…", status="disabled")curl -X DELETE https://api.ody.co/v1/api/webhooks/3a8f… \
-H "Authorization: Bearer $ODY_API_KEY"await ody.webhooks.delete("3a8f…");client.webhooks.delete("3a8f…")#Rotate the signing secret
/v1/api/webhooks/:id/rotateIssues a new whsec_ secret and returns it once. Signatures made with the old secret stop validating immediately. Deploy the new secret to your verifier first, or accept both secrets briefly (see Verifying signatures).
Scope: webhooks:manage
Returns { webhook }, including the new secret.
curl -X POST https://api.ody.co/v1/api/webhooks/3a8f…/rotate \
-H "Authorization: Bearer $ODY_API_KEY"const { secret } = await ody.webhooks.rotate("3a8f…");secret = client.webhooks.rotate("3a8f…")["secret"]#Send a test delivery
/v1/api/webhooks/:id/testPOSTs one event to the endpoint, signed exactly like a real delivery, and returns the result straight away. This is the fastest way to check your signature verification and your handler.
Scope: webhooks:manage
Body (optional)
typestring —ping(the default), or any event type such asmessage.received. With an event type, Ody sends a realistic sample of that event: the same fields as a real one, with made-up ids and phone numbers, and anidthat starts withevt_test_. The sample is sent even if the endpoint isn't subscribed to that type, and to a disabled endpoint too.
A test is one attempt and is never retried. It appears in the delivery history.
Returns { delivered: boolean, attempt: { at, statusCode, error?, durationMs }, type, eventId }. delivered is true for any 2xx response. Returns 400 for an unknown type.
curl -X POST https://api.ody.co/v1/api/webhooks/3a8f…/test \
-H "Authorization: Bearer $ODY_API_KEY"curl -X POST https://api.ody.co/v1/api/webhooks/3a8f…/test \
-H "Authorization: Bearer $ODY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"message.received"}'const { delivered, attempt } = await ody.webhooks.test("3a8f…");
// SDK 0.10.0 and later:
await ody.webhooks.test("3a8f…", { type: "message.received" });res = client.webhooks.test("3a8f…")
# SDK 0.10.0 and later:
res = client.webhooks.test("3a8f…", type="message.received"){
"delivered": true,
"attempt": { "at": "2026-10-14T18:21:03.114Z", "statusCode": 200, "durationMs": 143 },
"type": "message.received",
"eventId": "evt_test_mdv4k2p97xq3"
}#List deliveries
/v1/api/webhooks/:id/deliveriesRecent deliveries, newest first, with every attempt's status code or error. This is your debugging view. Deliveries are kept for 30 days. The app's Build → Webhooks shows the same list, plus the body that was sent and the start of your server's answer.
Scope: webhooks:manage
Query parameters
limitinteger — 1–200, default 50.
Returns { deliveries: [{ id, webhookId, eventId, eventType, status, attempts, nextAttemptAt, createdAt }] }.
eventTypestring | null — The event's type (pingfor a plain test).nullon deliveries made before 2026-11-24.statusstring —pending(the first attempt hasn't been made),retrying(an attempt failed and another is due atnextAttemptAt),success, orfailed(every attempt failed; nothing more is scheduled). See the retry schedule.attemptsarray — Each hasat,durationMs, andstatusCodeorerror.manual: truemarks an attempt made with Resend in the app.nextAttemptAttimestamp | null — When the next automatic attempt is due.
curl "https://api.ody.co/v1/api/webhooks/3a8f…/deliveries?limit=20" \
-H "Authorization: Bearer $ODY_API_KEY"const deliveries = await ody.webhooks.deliveries("3a8f…", { limit: 20 });deliveries = client.webhooks.deliveries("3a8f…", limit=20)