Skip to main content
POST
/
api
/
post-call-webhooks
/
create
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"
  }
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"
  }

Headers

X-API-KEY
string
required
Your API key (format: sk_...)
X-API-SECRET
string
required
Your API secret (format: s3cr3t_...)

Request Body

name
string
required
Webhook name for identificationExample: "Call Analytics Webhook"
url
string
required
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"
description
string
Optional description of the webhook’s purposeExample: "Receives call data after completion"
is_active
boolean
Whether the webhook is active (default: true)Only active webhooks will be triggered and can be assigned to agents.Example: true

Response Fields

id
string
Unique webhook identifier (format: webhook_...)
organization_id
string
The organization ID the webhook belongs to
name
string
Webhook name
url
string
Webhook URL
description
string
Webhook description (if provided)
is_active
boolean
Whether the webhook is currently active
created_at
string
ISO 8601 timestamp when the webhook was created
updated_at
string
ISO 8601 timestamp when the webhook was last updated

Error Responses

error
string
Bad Request - Validation error or invalid webhook URL
{
  "message": "Validation error",
  "status": "error",
  "error": "Webhook URL must be HTTPS"
}
error
string
Unauthorized - Missing or invalid API key/secret
error
string
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