Conversion Tracking (Meta CAPI)
Tracks a conversion event in the Meta Conversions API (CAPI) for Click-to-WhatsApp (CTWA) ads.
This endpoint triggers conversion events (e.g., LeadSubmitted, Purchase, Contact) attributed to Meta WhatsApp campaigns.
Pass conversationId either as a query parameter or in the JSON request body. Alternatively, lookup can be performed via phoneNumber, contactId, or ctwa_clid.
When parameters (eventName, value, currency, ctwa_clid, datasetId, accessToken) are omitted, they are automatically resolved from the conversation’s variables, metadata, stored CTWA click attribution records (checked against the 7-day Meta Ads window), or channel credentials.
Tracks a conversion event in the Meta Conversions API (CAPI) for Click-to-WhatsApp (CTWA) ads and WhatsApp business messaging.
Overview
This endpoint confirms to Meta Ads that an advertisement replied to by a customer resulted in a conversion (such as LeadSubmitted or Purchase).
When parameters are omitted, ChatVolt automatically resolves:
- Active conversation ID (via
phoneNumber,email,contactId, orctwa_clid) - Click-to-WhatsApp click identifier (
ctwa_clid) from stored attribution records within the 7-day attribution window - WhatsApp Business Account ID (
wabaId) and Page ID - Meta Dataset ID (Pixel ID) and Access Token from channel credentials, agent config, or conversation variables
- Automatic phone hashing (
ph) with Brazilian 9th digit variations and email hashing (em)
Authentication
Bearer Token (ChatVolt API Key) passed via Authorization: Bearer <API_KEY>.
Example Request (Purchase)
Example Request (Lead Resolution by Phone)
Example Response
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The ID of the conversation. Required if not provided in the request body or identified by phoneNumber/contactId/ctwa_clid.
Customer's phone number to resolve the active conversation if conversationId is omitted.
Customer's email to resolve the active conversation or enrich Meta event match quality.
Customer's contact ID in ChatVolt to resolve the conversation.
Click-to-WhatsApp Click ID from Meta Ad to resolve the conversation.
WhatsApp Business Account ID (WABA ID) for business messaging attribution. Optional if configured in channel or agent.
Facebook Page ID connected to the WhatsApp account/ad. Optional if configured in channel or agent.
Meta Pixel or Dataset ID. Optional if configured in channel, agent, or conversation variables.
Body
The ID of the conversation. Required if not provided in query parameters or identified by phoneNumber/email/contactId/ctwa_clid.
Customer's phone number for conversation lookup if conversationId is omitted.
Customer's email for conversation lookup and Meta event matching.
Customer contact ID for conversation lookup.
Meta Dataset ID (Pixel ID). Falls back to conversation variables, metadata, agent config, or channel config.
Custom Meta Access Token (CAPI Token). If omitted, uses channel credentials or system token.
WhatsApp Business Account ID (WABA ID) for business messaging attribution.
Facebook Page ID associated with the WhatsApp ad.
Name of the Meta conversion event (e.g., 'Purchase', 'LeadSubmitted', 'CompleteRegistration'). In business_messaging, Meta requires 'LeadSubmitted' for leads. Defaults to 'Purchase' if value > 0, otherwise defaults to 'LeadSubmitted'. Note that 'Purchase' requires a positive monetary value.
Unix timestamp in seconds when the event occurred (must be within the last 7 days). If omitted, automatically filled with current server timestamp.
The Click-to-WhatsApp click identifier (ctwa_clid). If omitted, it is automatically retrieved from conversation attribution records if within the 7-day window.
Monetary value of the conversion. Accepts numbers or localized strings (e.g. '150,50' or '150.50'). Falls back to conversation variables or metadata.
Three-letter ISO currency code (e.g., 'BRL', 'USD'). Falls back to conversation variable 'currency', metadata, or defaults to 'BRL'.
Unique event identifier for deduplication in Meta. Defaults to a deterministic unique ID ('ctwa_{ctwaClickId || conversationId}_{eventName}') ensuring strict idempotency on automatic retries.
Order identifier used as eventId for deduplication and forwarded to Meta custom_data.order_id for order reconciliation.
Transaction identifier used as eventId for deduplication.
Code from Meta Events Manager 'Test Events' tool to verify delivery in real-time.
Response
True if Meta accepted and processed at least one event (events_received > 0).
Whether conversion matched via direct CTWA ad click (ctwa_direct), phone number match (phone_match), or customer email match (email_match).
ctwa_direct, phone_match, email_match, none True if CTWA click occurred more than 7 days ago. Note that ctwa_clid is still forwarded to Meta to enable extended ad attribution.
Number of events received by Meta.
Informational or warning messages returned by Meta API.
Array of warning messages from Meta.
Meta internal trace ID for debugging.
Was this page helpful?

