Create a new post-call webhook configuration that will be triggered after each call completes. Post-call webhooks receive call data, transcripts, and analysis results.
curl -X POST "https://api.zudu.ai/api/post-call-webhooks/create" \
-H "X-API-KEY: sk_Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234Yz" \
-H "X-API-SECRET: s3cr3t_Xyz789Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234" \
-d '{
"name": "Call Analytics Webhook",
"url": "https://your-server.com/webhooks/call-complete",
"description": "Receives call data after completion",
"is_active": true
}'
{
"message": "Post-call webhook created successfully",
"status": "success",
"error": null,
"data": {
"id": "webhook_abc123def456...",
"organization_id": "org_1234567890",
"name": "Call Analytics Webhook",
"url": "https://your-server.com/webhooks/call-complete",
"description": "Receives call data after completion",
"is_active": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Your API key (format: sk_...)
Your API secret (format: s3cr3t_...)
Request Body
Webhook name for identificationExample: "Call Analytics Webhook"
Webhook URL (must be HTTPS)This is the endpoint where post-call data will be sent after each call completes.Example: "https://your-server.com/webhooks/call-complete"
Optional description of the webhook’s purposeExample: "Receives call data after completion"
Whether the webhook is active (default: true)Only active webhooks will be triggered and can be assigned to agents.Example: true
Response Fields
Unique webhook identifier (format: webhook_...)
The organization ID the webhook belongs to
Webhook description (if provided)
Whether the webhook is currently active
ISO 8601 timestamp when the webhook was created
ISO 8601 timestamp when the webhook was last updated
Error Responses
Bad Request - Validation error or invalid webhook URL{
"message": "Validation error",
"status": "error",
"error": "Webhook URL must be HTTPS"
}
Unauthorized - Missing or invalid API key/secret
Internal Server Error - Failed to create webhook{
"message": "Failed to create post-call webhook",
"status": "error",
"error": "Database connection failed"
}
Notes
- The webhook will be automatically assigned to your organization based on the API key (organization ID is automatically extracted)
- Webhook URLs must use HTTPS
- Only active webhooks can be assigned to agents
- After creation, you can assign this webhook to agents using the Agent Webhooks API
- The webhook will be triggered automatically after each call completes for agents that have it assigned