Agent webhooks
Each agent has two webhooks:
Configure both on the agent Advance tab. The API Keys page lists each agent’s start-call URL for quick copy.
Queuing
API outbound dials also respect
server.max_concurrent_api_outbound_dials (default 20) for in-flight worker tasks.
1. Start call webhook
Option A — REST + API key
Option B — Start-call webhook (HMAC)
POST /api/v1/webhooks/agents/{agent_id}/incoming
Sign the raw body with your agent secret:
POST /api/v1/webhooks/agents/{agent_id}/rotate-secret).
Body fields: phoneNumber (or to_number / phone_number), optional phone_number_id, optional template variables.
Template variables ({{placeholders}})
Configure attached variables on the agent (defaults always applied to the dial). On each request you can override them:
2. Call ended webhook
When a call finishes, Kupe runs the system lead post-call analysis, then — if call-ended is enabled and the web call / phone call toggles match — POSTs JSON to your CRM URL. Manage config:PUT body example:
Payload (lead schema)
Top-level fields are the system default lead analysis (plus session metadata). The webhook also includes every post-call analysis for the session:post_call_analyses— array of all PCA rows (system default + attached Call Analysis rules + legacy), each withrule_name,source,structured_json/body_text/tool_invocationpost_call_analysis_count— length of that array
customer_name,mobile_number,email,company_name,lead_sourcecall_datetime,call_duration,call_direction(inbound|outbound),call_status,recording_urllead_status,lead_temperature,ai_summary,lead_scorenext_action,next_follow_up_date,crm_stagesend_whatsapp,send_email,reminder_to_sales_team- plus
call_session_id/agent_idand legacy aliases (call_summary,user_name, …)
2xx.
