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 a specific agent.

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

Set the agentId field 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 agentId 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:
Set agentId to null 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 matches the endpoint’s agentId (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