Skip to main content
DELETE
/
api
/
agents
/
{agentId}
/
tools
/
post-call-webhook
/
{webhookId}
curl -X DELETE "https://api.zudu.ai/api/agents/agent_1234567890abcdef/tools/post-call-webhook/webhook_abc123def456" \
  -H "X-API-KEY: sk_Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234Yz" \
  -H "X-API-SECRET: s3cr3t_Xyz789Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234" \
{
  "message": "Post-call webhook assignment removed successfully",
  "status": "success",
  "error": null,
  "data": {
    "agent_id": "agent_1234567890abcdef",
    "agent_name": "Customer Support Agent",
    "removed_webhook_id": "webhook_abc123def456",
    "removed_webhook_name": "Call Analytics Webhook",
    "removed_tools_count": 1,
    "success": true
  }
Remove a specific post-call webhook assignment from an agent by webhook ID. This endpoint requires both the agent ID and the webhook ID to ensure you’re removing the correct webhook.
curl -X DELETE "https://api.zudu.ai/api/agents/agent_1234567890abcdef/tools/post-call-webhook/webhook_abc123def456" \
  -H "X-API-KEY: sk_Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234Yz" \
  -H "X-API-SECRET: s3cr3t_Xyz789Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901Vwx234" \
{
  "message": "Post-call webhook assignment removed successfully",
  "status": "success",
  "error": null,
  "data": {
    "agent_id": "agent_1234567890abcdef",
    "agent_name": "Customer Support Agent",
    "removed_webhook_id": "webhook_abc123def456",
    "removed_webhook_name": "Call Analytics Webhook",
    "removed_tools_count": 1,
    "success": true
  }

Path Parameters

agentId
string
required
The ID of the agent to unassign the webhook from (format: agent_...)Example: agent_1234567890abcdefNote: The agent_ prefix is optional - it will be added automatically if not provided
webhookId
string
required
The ID of the webhook to unassign (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

agent_id
string
The agent ID the webhook was unassigned from
agent_name
string
The name of the agent
removed_webhook_id
string
The webhook ID that was removed
removed_webhook_name
string
The name of the webhook that was removed
removed_tools_count
integer
Number of webhook tools removed from the agent’s tools list
success
boolean
Indicates successful removal (always true on success)

Error Responses

error
string
Unauthorized - Missing or invalid API key/secret
error
string
Not Found - Agent or webhook does not exist, or webhook not assigned
{
  "message": "Agent not found",
  "status": "error",
  "error": "Agent not found in organization"
}
Or:
{
  "message": "Webhook not assigned",
  "status": "error",
  "error": "Agent does not have webhook 'webhook_123' assigned"
}
error
string
Internal Server Error - Failed to remove webhook assignment
{
  "message": "Failed to remove webhook assignment",
  "status": "error",
  "error": "Database connection failed"
}

Notes

  • This endpoint requires both the agent ID and webhook ID to ensure you’re removing the correct webhook
  • The webhook must be currently assigned to the agent, otherwise a 404 error will be returned
  • The webhook assignment is cleared from the agent’s post_call_webhook_id field
  • Corresponding webhook tools are also removed from the agent’s tools array for consistency
  • Use this endpoint when you know the specific webhook ID you want to remove
  • For a simpler unassign operation that removes any webhook, use PATCH /api/agents/{agentId}/unassign