Skip to main content
Sapt can deliver conversions to Meta’s Conversions API (CAPI) for you — server-side, deduped against your browser pixel, with customer data hashed before it leaves Sapt. You connect a pixel once, then either send conversions through the API or let Sapt fire them automatically from Shopify/Stripe and your tracked site. There are two ways to power the pixel’s token, and both are Meta-compliant:
  • OAuth-sourced — Sapt derives the token from your connected Meta account. Nothing to paste.
  • Pasted token — you generate a pixel-scoped CAPI token in Meta Events Manager and store it here. Use this when your pixel lives in a Business Manager that isn’t the one you connected, or when you want an explicit, scoped token.
Use a pixel-scoped CAPI access token (generated in Events Manager) — not a broad ad-account token. Meta’s terms prohibit sharing general access tokens; a CAPI token tied to a single pixel is the supported credential for server events.

Before you start

You need three things in place. The whole setup, end to end:
  1. An API key — create one in your Sapt dashboard under Account → API Keys (starts with sapt_). See Authentication.
  2. Meta connected to the project, with ads permissions — see Connecting integrations. This is what lets Sapt discover your pixels.
  3. A pixel connected for CAPI — steps 1–2 below.
Once connected, sending conversions (step 3) is a single call you can make from anywhere.

1. Find your pixel

List the Meta pixels discoverable through your connected Meta account:
If the list is empty, connect Meta with ads permissions first (see Connecting integrations), or create a pixel in Events Manager.

2. Connect the pixel

Pin a pixel for CAPI. Either paste a pixel-scoped token, or set useOauthToken: true to source it from your Meta connection.
Check or remove the connection any time:
The access token is never returned by GET /capi-pixel.
Generating a pixel-scoped token in Events Manager: open Events Manager, pick your pixel → SettingsConversions APIGenerate access token. That token is scoped to the one pixel — paste it into accessToken above.

3. Send a conversion

Send a conversion server-side. Sapt hashes the customer data and delivers it to Meta.
  • kind — one of Lead, Purchase, CompleteRegistration, AddToCart, InitiateCheckout, ViewContent, Subscribe, PageView.
  • eventId — send the same id from your browser pixel (fbq) so Meta dedupes the browser and server events. If you omit it, Sapt mints one and returns it in the response.
  • Other optional fields: value, currency, phone, visitorId, personId, sourceUrl.
A 202 means the conversion was accepted and queued for delivery. Connect a pixel first (step 2) — events sent without a connected pixel are dropped.

4. Verify with a test event

Fire a synthetic event and watch for it in Events Manager → Test Events:

Keep going

Connecting integrations

REST API Reference

Ads