Skip to main content

Webhook Filtering

By default, a webhook endpoint receives events from all agents in your account. Agent filtering lets you scope an endpoint to only receive events from the agents you choose.

Why Filter by Agent?

Common scenarios:
  • Multi-CRM setup different agents serve different CRMs, each needs its own webhook
  • Team separation sales and support agents route to different backends
  • Testing point test agent events to a staging endpoint without affecting production

Setting Up Agent Filtering

In the dashboard, open Connecter > Webhooks, add or edit a webhook, and use Agent Filter on the Endpoint step (click Customize, then add agents). Leave it on “All agents (default)” for no filter. Through the API, set the agentIds field (up to 50 agent IDs) when creating a webhook endpoint:
This endpoint will only receive events from the agent_sales_qualifier agent.

Example: Multi-CRM Setup

Each CRM only receives events relevant to its agent.

Creating Multiple Filtered Endpoints

You can create as many filtered endpoints as needed:

Catch-All Endpoint

Create an endpoint without agentIds to receive events from all agents:
This is useful for analytics, logging, or audit purposes.

Updating an Existing Endpoint’s Filter

Change the agent filter on an existing endpoint:
Send "agentIds": [] to remove the filter and receive events from all agents.

Combining with Event Type Filtering

Agent filtering works alongside event type filtering. The endpoint only receives events that match both criteria:
  • Event type is in the eventTypes array AND
  • The event’s agent is one of the endpoint’s agentIds (or no agent filter is set)

Best Practices

  • Use filtered endpoints for production integrations to avoid processing irrelevant events
  • Keep a catch-all endpoint for monitoring and debugging
  • Name your endpoints descriptively (use the description field) so it’s clear which agent maps where
  • When retiring an agent, remember to delete or update its webhook endpoint