company logo

Help center

Go to K3X
All collectionsIntegrationsWebhooks in K3X — the basics

Webhooks in K3X — the basics

How K3X talks to other tools over webhooks — what comes in, what goes out, and how to wire it up.

Webhooks are how K3X talks to other systems in real time. They go both ways:

  • Inbound — something happens in another tool (a form submit, a Stripe charge, a Slack message). That tool POSTs to a URL K3X gives you, and an Agent wakes up to handle it.

  • Outbound — something happens in K3X (new lead, deal moves stage, email reply). K3X POSTs to a URL the other tool gives you, and that tool does what it does.

If you've used Zapier, Make, or n8n before, you already know the shape. K3X just plugs into the same pattern from both ends.

Inbound: an Agent with a webhook trigger.

Every Agent has a webhook URL. Open the Agent, switch on the Webhook trigger, and K3X gives you a unique HTTPS endpoint that looks something like:

https://api.k3x.ai/v1/agents/agt_8f4a2/webhook

Anything that can POST to that URL — Make, Zapier, n8n, curl, a Python script, your form provider — can fire that Agent. The Agent receives the request body as JSON, has access to it inside its instructions, and runs as soon as the request arrives.

A few things worth knowing about inbound:

  • The URL is unique per Agent. Treat it like an API key — don't paste it into Slack, don't commit it to a public repo.

  • K3X expects JSON in the request body. Other content types may work but JSON is the path we test.

  • You can sign requests. In the Agent's webhook settings, generate a signing secret. Senders include an X-K3X-Signature header (HMAC-SHA256 of the body, hex-encoded). K3X rejects requests with a missing or wrong signature. Optional but recommended for anything in production.

  • Successful POSTs return 200. Validation errors return 4xx with a JSON error body. Server errors return 5xx — retry logic is on the sender's side.

Outbound: K3X POSTs to you.

For each Agent that needs to notify the outside world, you can configure outbound webhook actions. Pick an event (deal stage changed, lead created, email reply received, etc.), give K3X the destination URL, and K3X will POST a JSON payload when that event fires.

A few notes on outbound:

  • K3X retries on 5xx with exponential backoff. 4xx responses are treated as "the sender misunderstood me, don't retry."

  • Payloads include a stable schema per event type and an event_id you can use for idempotency.

  • K3X signs outbound requests with the same HMAC scheme — verify the X-K3X-Signature header on your side before trusting the body.

The mental model.

Think of it like this: inbound webhooks are how the world tells K3X something happened. Outbound webhooks are how K3X tells the world something happened. Agents sit in the middle and do the work.

Most teams start with inbound — wire a Typeform or a Stripe webhook to an Agent that creates a lead. Once that's running, outbound becomes the natural next step — when an Agent qualifies a lead, post to a Slack channel; when a deal closes, fire a row into Google Sheets.

The next three articles walk through the most common third-party tools: Make.com, Zapier, and n8n. Pick the one your team already uses — the pattern is the same in all three.

Next: Connect K3X with Make.com →

Did this answer your question?
😞
😐
😁