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 send conversions through the API, let your conversion definitions fire them from tracked-site events and new CRM records, or add a Track a conversion step to a workflow (for example on a Stripe payment trigger). Shopify and Stripe payments do not fire conversions on their own. 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 and 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 → Settings → Conversions API → Generate 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 the ad platform the customer came from, found from their tracked visit (visitorId, or the email or phone the tracking script already tied to a visitor). A conversion with no known ad source is recorded in Sapt and sent nowhere.
  • kind: one of Lead, Purchase, CompleteRegistration, AddToCart, InitiateCheckout, PageView, ViewContent, Subscribe, Qualified, Schedule, Contact, Showed, NoShow, Disqualified.
  • 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. A CAPI pixel must be connected first (step 2), and the API key needs the web_analytics:write permission.

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