- 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.
Before you start
You need three things in place. The whole setup, end to end:- An API key — create one in your Sapt dashboard under Account → API Keys (starts with
sapt_). See Authentication. - Meta connected to the project, with ads permissions — see Connecting integrations. This is what lets Sapt discover your pixels.
- A pixel connected for CAPI — steps 1–2 below.
1. Find your pixel
List the Meta pixels discoverable through your connected Meta account:2. Connect the pixel
Pin a pixel for CAPI. Either paste a pixel-scoped token, or setuseOauthToken: true to source it from your Meta connection.
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 Meta.kind— one ofLead,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.
202 means the conversion was accepted and queued for delivery. Connect a pixel first (step 2) — events sent without a connected pixel are dropped.