API Reference
Facebook LoginGETLogin dialog
Conversions API

Send events

POST/v27.0/{dataset_id}/events
Base URL: https://meta-ads.mimicr.dev · provider: https://graph.facebook.com

Sends up to 1,000 server events to a dataset. Requires ads_management and access to the dataset's account (whatsapp_business_manage_events for WhatsApp business-messaging events).

If any event is invalid, the request returns an error; valid events with an event_id are still stored, and resending drops them as duplicates. Unhashed customer data is accepted with a warning in messages and doesn't match.

In Mimicr, each event gets an outcome visible in the console and the control API: matched_click (a ctwa_clid of a sandbox click-to-WhatsApp click, or the fbclid of fbc from a sandbox web click, up to 28 days old), matched_user, unmatched, duplicate or rejected. Matched purchases show up in the ad's insights.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Path parameters

dataset_idstringrequired

ID of the dataset (pixel, or the WABA dataset).

Example: "100539998049733"

Body

application/x-www-form-urlencoded
dataobject[]required

The events (up to 1,000).

Show child attributes
event_namestringrequired

Standard (Purchase, Lead, …) or custom event name.

Example: "Purchase"
event_timeintegerrequired

UNIX seconds (GMT). More than 7 days in the past (62 for physical_store) fails the whole request (100/2804003); more than 1 h in the future, 100/2804004.

Example: 1794028091
event_idstring

Your id of the event, used for deduplication (event_name + event_id). In Mimicr, ids starting with rejeitar- are rejected (100/2804050) and nomatch- are stored unmatched.

action_sourcestringrequired

Where the conversion happened.

emailwebsiteappphone_callchatphysical_storesystem_generatedbusiness_messagingother
messaging_channelstring

Required for business_messaging.

whatsappmessengerinstagram
event_source_urlstring

URL of the page. Required for website.

user_dataobjectrequired

Customer information. em, ph, fn, ln, ge, db, ct, st, zp, country and external_id must be SHA-256 lowercase hex (one value or an array); the rest is sent as is.

Show child attributes
emstring[]

Email, hashed.

phstring[]

Phone with country code, digits only, hashed.

fnstring

First name, hashed.

lnstring

Last name, hashed.

ctstring

City, hashed.

ststring

State, hashed.

zpstring

Zip code, hashed.

countrystring

Country, hashed.

external_idstring

Your id for the customer, hashed. Alone it doesn't count as an identifier for WhatsApp events.

fbcstring

Click ID: fb.1.<ms>.<fbclid>.

fbpstring

Browser ID (_fbp cookie).

client_ip_addressstring

IP of the browser.

client_user_agentstring

User agent of the browser. Required for website events.

ctwa_clidstring

Click ID of a click-to-WhatsApp ad (referral.ctwa_clid). Requires whatsapp_business_account_id.

whatsapp_business_account_idstring

ID of the WhatsApp Business account of the conversation.

page_idstring

ID of the Page. Required for WhatsApp events without ctwa_clid.

page_scoped_user_idstring

Page-scoped user ID.

custom_dataobject

currency, value and other custom data. value requires currency.

Show child attributes
currencystring
valuenumber
data_processing_optionsstring[]

["LDU"] with data_processing_options_country and _state.

test_event_codestring

Code of the Test events tool. Test events are flagged, still counted.

partner_agentstring

Partner identifier (stored).

namespace_idstring

Stored.

upload_idstring

Stored.

upload_tagstring

Stored.

upload_sourcestring

Stored.

Responses

200OK.
events_receivedinteger

Number of events received, duplicates included.

messagesstring[]

Warnings (unhashed fields, …).

fbtrace_idstring
400Error in the Graph envelope: 100/2804003 event too old, 100/2804004 event in the future, 100/2804050 insufficient customer information, 100/2804051 WhatsApp event without ctwa_clid and page_id, 100 invalid event.
errorobjectrequired
Show child attributes
messagestringrequired

Description of the error.

Example: "(#100) The parameter special_ad_categories is required"
typestringrequired

OAuthException for most codes (the Marketing API uses it for validation too), GraphMethodException for unknown objects, FacebookApiException for transient errors. In Mimicr, routes outside the integration core answer MimicrNotSimulated with HTTP 501.

Example: "OAuthException"
codeintegerrequired

Error code (100 invalid parameter, 190 invalid token, 200 permission, 2635 deprecated version, 613/17/80004 rate limits, …).

Example: 100
error_subcodeinteger

Error subcode with more detail (1885272 budget too low, 463 token expired, …).

Example: 1885272
is_transientboolean

Whether retrying the same request may succeed. Present on every Marketing API error; true for codes 1 and 2.

error_user_titlestring

Title of the error, to show to people.

error_user_msgstring

Message of the error, to show to people.

error_dataobject

Extra data. blame_field_specs lists the params that caused a validation error.

Show child attributes
blame_field_specsstring[][]
fbtrace_idstringrequired

Internal support identifier of the request.

Example: "AbCdEf12345"