Skip to main content
POST
/
api
/
post-call-webhooks
/
{id}
/
toggle
curl -X POST "https://api.zudu.ai/api/post-call-webhooks/webhook_abc123def456/toggle" \
  -H "X-API-KEY: sk_Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234Yz" \
  -H "X-API-SECRET: s3cr3t_Xyz789Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234" \
{
  "message": "Post-call webhook activated 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-15T11:00:00Z"
  }
Toggle the active status of a post-call webhook. If the webhook is currently active, it will be deactivated. If it’s inactive, it will be activated.
curl -X POST "https://api.zudu.ai/api/post-call-webhooks/webhook_abc123def456/toggle" \
  -H "X-API-KEY: sk_Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234Yz" \
  -H "X-API-SECRET: s3cr3t_Xyz789Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234" \
{
  "message": "Post-call webhook activated 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-15T11:00:00Z"
  }

Path Parameters

id
string
required
The ID of the webhook to toggle (format: webhook_...)Example: webhook_abc123def456

Headers

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

Response Fields

id
string
Unique webhook identifier
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
Updated active status (toggled value)
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
Unauthorized - Missing or invalid API key/secret
error
string
Not Found - Webhook does not exist
{
  "message": "Post-call webhook not found",
  "status": "error",
  "error": "Webhook with ID 'webhook_123' does not exist"
}
error
string
Internal Server Error - Failed to toggle webhook
{
  "message": "Failed to toggle post-call webhook",
  "status": "error",
  "error": "Database connection failed"
}

Notes

  • The webhook status will be toggled (active ↔ inactive)
  • If you deactivate a webhook, it cannot be assigned to agents until reactivated
  • The response message will indicate whether the webhook was “activated” or “deactivated”
  • Use this endpoint for quick status changes without needing to send a full update request
  • The updated_at timestamp is automatically updated when the status changes