Skip to content

Developer Workflows

B2B SaaSMarketplacesE-commerce

Route inbound events, alerts, and journey webhooks

Use Apex's three purpose-built webhook surfaces: HMAC-verified inbound sources, Slack/HTTP operator alerts on experiment outcomes, and signed HTTPS journey destinations with key rotation.

HMAC-SHA256 verification, ping testing, and secret rotation built in.

6 min read12 min setupUpdated
Systems engineer plugging color-coded braided patch cables into a tidy aluminum studio audio-style routing board.
Three dedicated webhook surfaces keep inbound events, operator alerts, and outbound journey steps cleanly separated and signed.

Three-surface webhook router

Inspect Apex's inbound, operator-alert, and journey webhook contracts

Switch between the three webhook surfaces to inspect exact endpoints, required HMAC headers, supported triggers, and SSRF validation rules.

Illustrative workspace · Webhooks API contract explorer
8,000
ApexApex · Live Playbook Simulator

People entering journey

8,000

Cap: 3 sends / week

Recovered conversions

512

+184 over single-channel email

Unsubscribe rate

0.7%

Down from 1.9% unguarded blast

Journey performance by orchestration strategy

StrategyConversionsRevenueUnsubscribes
Static email drip328$27,552152
Apex Adaptive Journey512$43,00856

Conversions with adaptive branching

512

+$15,456 incremental revenue

  • Exits immediately on conversion so buyers never get a redundant nudge.
  • Workspace guardrails cap sends at 3/week and honor quiet hours.

Adaptive send decision path

  1. Hour 0Trigger event enters journeyGuardrails

    Apex checks suppression list, quiet hours, and weekly send cap.

  2. Hour 24Channel fallback branchAdaptive

    Non-openers with push permission receive a concise mobile/web push instead of a second email.

  3. On purchaseImmediate conversion exitExit goal

    Journey halts the instant checkout completes and credits the winning branch.

The complete playbook

Step-by-step setup, worked math, and real limits.

Steps, technical details, and live pricing.

How it works without Apex

Pick the Apex webhook surface built for your direction of data flow: register an inbound source at /api/webhooks (returning a one-time whsec_ HMAC secret) to ingest signed JSON, use /api/notifications for Slack or HTTPS alerts on six workspace triggers (including experiment.started and experiment.completed), or register a journey Webhook destination at /api/webhook-destinations with HMAC signing, key rotation, and ping tests.

How Apex does it for you

Apex separates inbound ingestion, operator alerts, and outbound journey webhooks so each path enforces HMAC-SHA256 verification, blocks private-IP SSRF targets, and supports one-click secret rotation and test pings.

How to set this up in 5 steps

  1. Choose which of the three webhook surfaces fits your flow

    Use /api/webhooks for signed inbound events into Apex, /api/notifications for Slack or HTTP operator alerts, and /api/webhook-destinations for outbound steps inside an Adaptive Journey.

  2. Register inbound sources and store the one-time whsec_ secret

    POST to /api/webhooks with a lowercase source name and optional dot-path fieldMapping. Save the returned whsec_ secret immediately because Apex shows it only once, and sign incoming bodies with x-webhook-signature, x-hub-signature-256, or stripe-signature.

  3. Subscribe Slack or HTTPS endpoints to operator alerts

    POST to /api/notifications as a workspace admin with type slack or webhook and any subset of the six supported triggers: experiment.started, experiment.completed, task.created, budget.recommendation, model.drift, or scoring.changed.

  4. Register journey destinations with private-IP SSRF protection

    POST an HTTPS baseUrl to /api/webhook-destinations (or configure it in Set up Apex). Private IPs and cloud metadata hosts are rejected automatically, and each destination receives its own HMAC signing key.

  5. Ping your destination and test key rotation

    Send a live test payload via POST /api/webhook-destinations/:id/ping to verify your signature check, and use POST /api/webhook-destinations/:id/rotate whenever you need to roll signing secrets.

Three webhook surfaces at a glance

Teams often assume one webhook endpoint handles everything. In Apex's Webhooks API, three distinct surfaces exist on purpose so inbound ingestion, workspace alerts, and journey automation never blur security permissions:

SurfacePathDirectionWho configures it
Inbound source/api/webhooksOutside system into ApexSession or apex_sk_ key
Operator alerts/api/notificationsApex to Slack or HTTPSWorkspace admin only
Journey destination/api/webhook-destinationsAdaptive Journey step to your stackWorkspace admin only
Backend developer and product operations lead reviewing printed event payload cards across a bright wooden desk.
Every inbound source receives a one-time whsec_ signing secret and maps nested JSON dot-paths into clean analytics fields.

Inbound sources and HMAC headers

When an external system outside Apex's native connectors needs to push signed analytics payloads into Apex, register a lowercase source name and dot-path fieldMapping:

curl -X POST https://app.apex.inc/api/webhooks \
  -H "Content-Type: application/json" \
  -H "x-api-key: apex_sk_..." \
  -d '{
    "source": "billing",
    "fieldMapping": {
      "customer.email": "email",
      "amount": "value"
    }
  }'

Store the returned whsec_ secret immediately because Apex displays it only at creation time. Every incoming POST to https://app.apex.inc/api/webhooks/<source> must sign the raw request body with HMAC-SHA256 using one of three headers: x-webhook-signature, x-hub-signature-256, or stripe-signature. Unsigned or tampered payloads are rejected automatically.

Honest scope note: Custom /api/webhooks/:source sources map payloads into analytics rows rather than writing revenue events today. For verified Stripe, HubSpot, or Shopify revenue, use the native connector or the Server Events API.

Operator alerts and journey destinations

Operator alerts (/api/notifications)

To notify Slack or an internal HTTPS receiver when experiments or scoring models move, create a notification rule subscribing to any subset of the six supported triggers:

  • experiment.started and experiment.completed
  • task.created and budget.recommendation
  • model.drift and scoring.changed

Unknown trigger names are dropped (there is no goal.reached, lead.created, or connector.synced trigger). Inspect recent delivery attempts anytime with GET /api/notifications?logs=true.

Platform security specialist inspecting a brass numbered key tag rack mounted beside a sunlit studio wall.
Each journey destination holds its own rotatable HMAC key and rejects private IPs or cloud metadata addresses automatically.

Journey destinations (/api/webhook-destinations)

A journey Webhook step never lets an editor paste an unvetted URL directly on the canvas. First register the HTTPS baseUrl under Set up Apex (or POST /api/webhook-destinations). Apex rejects private IPs and metadata hosts to prevent SSRF, issues an isolated HMAC signing key per destination, and provides two operational endpoints:

  • POST /api/webhook-destinations/:id/ping to test connectivity and signature verification live
  • POST /api/webhook-destinations/:id/rotate to roll a destination's signing key cleanly

What this costs on Apex

Live Apex pricing · Pay-as-you-go

Estimated Apex cost for SaaS ops team routing 12,000 inbound webhook events and 8,000 journey webhook actions per month

$0 / month

Covered by monthly free allowances.

Apex meter / scheduleScenario volumeFree allowance / basisRateApex cost
Events
Signed inbound webhook events recorded via /api/webhooks/:source (12,000 monthly custom inbound payloads)
12,000 / mo1M / month$5 per 100K events$0
Orchestrations
Journey step evaluations and holdout assignments (8,000 monthly journey assignments)
8,000 / mo1M / month$5 per 100K assignments$0

Operator alerts to Slack and HTTP via /api/notifications and signed journey webhook deliveries carry zero extra ad-platform activation charge. History: 13 months no card, 3 years with card, 7 years once you've paid an invoice. Live pricing.

Operator alerts to Slack and HTTP carry no extra per-notification fee, while inbound analytics payloads and outbound journey webhook calls meter cleanly alongside your regular workspace usage.

Register destinations via MCP

List and register HTTPS journey webhook destinations from your editor

Before wiring a Webhook step onto an Adaptive Journey canvas, ask your coding agent to inspect registered destinations or add a new HTTPS baseUrl.

1Add Apex to your editor

Install in Grok Build

Opens Grok Build and adds Apex. Nothing to configure.

2Tell your agent

Prompt for your AI editor

In my Apex workspace, call list_webhook_destinations to see what HTTPS endpoints are already registered for Adaptive Journeys, and verify whether our internal fulfillment hook is configured.

The first time your agent calls Apex, it gives you a link to approve in the browser. There is no key to paste. In Grok Build you can also run /setup-apex.

See how editor setup works step by step

growth-hooks · Grok BuildWaiting for approval
Agent
You

Set up Apex in this repo.

Set up Apex · 0 of 4
  • Signed in
  • Workspace named
  • Events arriving
  • Conversion picked
  • Stripe

Your move

Connect Apex to your internal stack without unsigned endpoints.

Keep inbound webhooks, Slack experiment alerts, and outbound journey calls cleanly separated with per-destination HMAC keys.