The two webhook directions
AgentFlow operates two distinct webhook directions, each with its own configuration and security model:Configure an inbound webhook
An inbound webhook lets any external tool POST lead data directly into AgentFlow’s qualification pipeline.Locate your inbound endpoint URL
Structure your payload
POST request with Content-Type: application/json. AgentFlow expects the following fields at minimum:Authenticate your inbound requests
X-AgentFlow-Timestamp is more than five minutes old, protecting against replay attacks.Test your inbound connection
received and triggers the qualification pipeline. An authentication failure shows status rejected with a reason code.Configure an outbound webhook
AgentFlow sends outbound webhook events to your configured URL whenever a lead reaches a terminal qualification state. Your downstream system receives the event and acts on it — creating a CRM record, triggering a Zapier zap, or notifying a Slack channel.Register your destination URL
Select the event types to receive
Verify outbound event signatures
X-AgentFlow-Signature header. Verify this signature in your receiving service before processing the payload to confirm the event genuinely originated from AgentFlow.Your outbound signing secret is available at Settings → Webhooks → Outbound → Signing Secret.Return a 2xx response quickly
2xx HTTP status code within ten seconds. If your processing takes longer than that, return 200 OK immediately and handle the event asynchronously in a background job or queue.If AgentFlow receives a non-2xx response or the request times out, it retries delivery with exponential backoff. Check your Outbound Logs to see delivery attempts and response codes.Security best practices
HTTPS only
Verify every signature
X-AgentFlow-Signature header on every inbound event your service receives. Reject any request that fails signature verification before touching the payload.Reject stale timestamps
X-AgentFlow-Timestamp is within five minutes of your server’s current time. Stale timestamp rejection prevents replay attacks where an attacker resends a previously captured valid request.Design for idempotency
lead_id field as a deduplication key. AgentFlow may retry delivery on timeout or transient failure — your handler should safely ignore or skip duplicate events with the same lead_id and event type.Troubleshooting common issues
Inbound: AgentFlow returns 422 Unprocessable Entity
Inbound: AgentFlow returns 422 Unprocessable Entity
name and email are present and that email is a valid address format. Review the error body in the response for a field-level description.Outbound: My endpoint is not receiving events
Outbound: My endpoint is not receiving events
Outbound: I'm receiving events but processing them twice
Outbound: I'm receiving events but processing them twice
lead_id plus the event type as a composite deduplication key. Store processed event IDs in a cache or database and skip events you have already handled. AgentFlow may deliver the same event more than once in retry scenarios.Outbound: Signature verification is always failing
Outbound: Signature verification is always failing