What this is
Facebook Conversions API (CAPI) is Meta’s server-to-server endpoint for sending web, app, and offline events directly to a Meta Pixel or Dataset — complementing browser-side pixel tracking with data you post from your own backend. This page describes the directPOST /events call to Meta’s Graph API: the URL structure, the required payload fields, and how to confirm Meta received the event. If you want Zeotap CDP to send events on your behalf from an audience or a Journey instead of calling the endpoint yourself, use the Facebook Conversions API destination.
Prerequisites
Before you can post events to the Conversions API, obtain the following:
- A Meta Business Manager account.
- A Meta Pixel (or Dataset) linked to your Business Manager.
- The Pixel ID (or Dataset ID) from Facebook Events Manager.
- A generated access token with Conversions API permission. The Generate access token link in Events Manager is visible only to users with developer privileges for the business.
action_source parameter is accurate to the best of your knowledge. For the full parameter reference, see the Conversions API parameters appendix.Post an event to the /events edge
To create new server events, send aPOST request to the /events edge for your Pixel ID:
access_token query parameter. Meta creates a new server event for each entry in the data array of your payload.
Example cURL request:
Structure the request body
Each request body carries adata array — one entry per event. Each entry accepts standard event fields, hashed user identifiers, and optional custom data. The example below sends two Purchase events in one call:
event_name— a standard Meta event (Purchase,AddToCart,Lead,ViewContent, and so on) or a custom event name. Mapping this field is mandatory; otherwise the call fails.event_time— Unix timestamp in seconds indicating when the event occurred. Mapping this field is mandatory; otherwise the call fails.event_source_url— required for website events. Must begin withhttp://orhttps://and match a domain verified against the Pixel.action_source— where the event originated (for example,websiteorapp).event_id— optional, and used together with a matching Pixelevent_idfor deduplication.user_data.client_user_agent— required for website events.user_data.em,user_data.ph, first name, and last name — must be SHA-256 hashed before you send them.client_ip_address,client_user_agent,fbc(Click ID), andfbp(Browser ID) are sent unhashed.custom_data—valueandcurrencyare mandatory forPurchaseevents.opt_out— set totrueto exclude the event from ads optimisation and attribution.
Why this happens
The/events endpoint rejects a request when required parameters are missing, credentials are invalid, or identifiers are formatted incorrectly. The conditions below cover the failures documented for the Conversions API integration.
Verify events were received
Meta Events Manager surfaces events posted to the Conversions API against the Pixel or Dataset you targeted. Once your POST returns a success response, the event appears against the Pixel in Events Manager.To verify from Meta’s side:
- Log into Meta Events Manager.
- Open the Pixel or Dataset that corresponds to the
PIXEL_IDyou posted to. - Review the event activity for the
event_namevalues you sent.
Troubleshoot rejected or missing events
Work through these checks when Meta returns an error or when events do not appear against your Pixel:- Confirm your POST target is
https://graph.facebook.com/{API_VERSION}/{PIXEL_ID}/events, with a supportedAPI_VERSIONand the correct Pixel or Dataset ID. - Confirm the
access_tokenquery parameter is present, has Conversions API permission, and has not been revoked. Regenerate the token from Events Manager if in doubt. - Confirm every website event carries both
event_source_urlanduser_data.client_user_agent. - Confirm
em,ph,fn, andlnare SHA-256 hashed strings, not plaintext. - Confirm the domain in
event_source_urlis verified against the Pixel. - For duplicate events across the Pixel and the API, send the same
event_nameand either a sharedevent_idor a combination ofexternal_idandfbpon both calls — Meta uses these to deduplicate.
FAQ
Do I still need the Facebook Pixel if I'm using the Conversions API?
Do I still need the Facebook Pixel if I'm using the Conversions API?
Meta recommends a setup that uses both the Pixel and the Conversions API to pass events. Zeotap’s integration covers only the server-to-server Conversions API — implementing the browser Pixel is your responsibility.
How do I avoid duplicate events when I send from both the Pixel and the API?
How do I avoid duplicate events when I send from both the Pixel and the API?
Use the same
event_name for the Pixel and the server event, and include either a shared event_id or a combination of external_id and fbp on both. Meta uses these values to deduplicate identical events.Which user_data fields must be SHA-256 hashed before I send them?
Which user_data fields must be SHA-256 hashed before I send them?
Hash
em (email), ph (phone), fn (first name), and ln (last name), along with date of birth, gender, city, state, zip, and country. Send client_ip_address, client_user_agent, fbc (Click ID), and fbp (Browser ID) unhashed.Which Meta event names does the /events endpoint accept?
Which Meta event names does the /events endpoint accept?
You can send any standard Meta event —
Purchase, AddToCart, AddToWishlist, CompleteRegistration, Lead, InitiateCheckout, Search, ViewContent, StartTrial, Subscribe, and others — or a custom event name defined for your business.