Skip to Content
WebhooksCode Examples

Code Examples

Minimal payload

phone and name are both required. full_name or fullName can be sent instead of name.

{ "phone": "+14155550132", "name": "Sarah Johnson" }

With the caller’s email

{ "phone": "+14155550132", "name": "Sarah Johnson", "email": "sarah.johnson@example.com" }

With extra context fields

{ "phone": "+14155550132", "name": "Sarah Johnson", "company": "Acme Ltd", "message": "Asked about the annual plan" }

phone, name (or its aliases full_name / fullName), and email are the recognised fields, but any other key you send is stored with the call and passed to the agent as context. Reference it in the prompt or welcome message as {company}, {message}, and so on β€” single braces, plain word_characters. For per-call metadata echoed back on the completion webhook, use the Calls API.

cURL

curl -X POST https://api.dialora.ai/webhooks/agents/webh_7ejvxjh9lq6bdgwo/trigger \ -H "Content-Type: application/json" \ -d '{ "phone": "+14155550132", "name": "Michael Chen", "email": "michael.chen@example.com" }'

Replace the webhook ID with your own β€” find it under Advanced Settings β†’ Call Management on your agent. See Finding Your Webhook URL.

Node.js

await fetch("https://api.dialora.ai/webhooks/agents/webh_7ejvxjh9lq6bdgwo/trigger", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ phone: "+14155550132", name: "Michael Chen", }), });

Python

import requests requests.post( "https://api.dialora.ai/webhooks/agents/webh_7ejvxjh9lq6bdgwo/trigger", json={"phone": "+14155550132", "name": "Michael Chen"}, )

Need more than this?

The webhook is deliberately simple β€” one call, one number. If you need per-call variables, your own metadata echoed back, scoped API keys, or a signed completion callback, use the Calls API instead.