Skip to content

Send converted calls to Meta Conversions API (Lead) with an outgoing webhook

Location: Webhooks → Outgoing; Campaign → Outgoing webhooks

Use case: On converted → POST a Meta Conversions API Lead event with one Moja outgoing webhook. Success is a 200 OK and a Meta response containing "events_received": 1 in Webhooks → Outgoing Requests.

This guide is Moja‑only. Provide your own Meta Pixel ID and Conversions API access token. Moja does not create Meta tokens or test codes.

The setup is:

  1. Create an outgoing webhook that triggers On converted
  2. POST to Meta’s /<PIXEL_ID>/events endpoint with a JSON body
  3. Attach the webhook to your campaign
  4. Verify delivery in Webhooks → Outgoing Requests (HTTP 200 and "events_received": 1)

Item Used for
Pixel ID (Meta dataset/pixel number) Path segment in the webhook URL
Conversions API access token access_token in the JSON body (treat like a password)
Test event code (optional) test_event_code while testing; remove before going live

Moja uses what you provide; it does not create these.


Portal → Webhooks → Outgoing → Create

Field Value
Name Clear label, e.g. Meta CAPI – Lead – <customer>
Event Type On converted
Method POST
URL https://graph.facebook.com/v25.0/<PIXEL_ID>/events (replace <PIXEL_ID>)
Query Parameters none
Headers Content-Type: application/json
Body Type JSON

Tip: Use Add Tags in the body editor to insert dynamic values. Tags render at send time.


Use plain string tags (not arrays). Omit keys that would be blank for this call. Do not reuse [call_id] as external_id — use it only for event_id (dedup).

{
"access_token": "YOUR_ACCESS_TOKEN",
"test_event_code": "YOUR_TEST_EVENT_CODE",
"data": [
{
"event_name": "Lead",
"event_time": "[event_timestamp_unix_seconds]",
"event_id": "[call_id]",
"action_source": "phone_call",
"event_source_url": "[landing_page]",
"user_data": {
"ph": "[caller_id_sha256]",
"em": "[email_sha256]",
"country": "[visitor_country_sha256]",
"external_id": "[visitor_id_sha256]",
"client_ip_address": "[visitor_ip]",
"client_user_agent": "[visitor_user_agent]",
"fbp": "[fbp]",
"fbc": "[fbc]"
}
}
]
}

Keys to omit when blank (common on non‑lander calls): event_source_url, client_ip_address, client_user_agent, fbp, fbc, external_id, em, country. Sending empty strings or unresolved placeholders reduces quality and can cause errors.

Field Moja Add Tag Notes
access_token (static) Customer’s CAPI token in the body (no Authorization header needed)
test_event_code (static) Optional for testing only; remove to go live
event_name (static) Lead
event_time [event_timestamp_unix_seconds] Unix seconds (not 0)
event_id [call_id] Dedup per call. Don’t use as external_id.
action_source (static) phone_call
event_source_url [landing_page] Optional; omit when blank
user_data.ph [caller_id_sha256] Hashed phone; required for call Leads
user_data.client_ip_address [visitor_ip] Plain
user_data.client_user_agent [visitor_user_agent] Plain
user_data.fbp [fbp] Plain
user_data.fbc [fbc] Plain (not [fbclid] alone)
user_data.em [email_sha256] Hashed email; often blank — omit when blank
user_data.country [visitor_country_sha256] Hashed lowercase visitor country; omit when blank
user_data.external_id [visitor_id_sha256] Hashed stable visitor id; omit when blank

  1. Attach the webhook to the campaign: Campaign → Outgoing webhooks → select the config → Save
  2. Place a converted call (or convert a qualifying test call)
  3. Open Webhooks → Outgoing Requests and locate the POST to graph.facebook.com
  4. Pass condition: HTTP 200 and a response with "events_received": 1

An event appearing in Meta does not by itself mean ad attribution; Meta still must match it to eligible interactions.


Meta’s Event Match Quality improves when more identifiers are included. Use every available Add Tag:

Meta field Moja Add Tag Form
ph [caller_id_sha256] SHA‑256 hex (Moja‑hashed)
client_ip_address [visitor_ip] Plain
client_user_agent [visitor_user_agent] Plain
fbp [fbp] Plain cookie
fbc [fbc] Plain cookie (not [fbclid] alone)
em [email_sha256] SHA‑256 hex (often blank — omit when blank)
country [visitor_country_sha256] SHA‑256 hex (omit when blank)
external_id [visitor_id_sha256] SHA‑256 hex (omit when blank)
event_source_url (event‑level) [landing_page] Optional URL

Also required on the event (not match‑quality PII):

  • event_time → [event_timestamp_unix_seconds]
  • event_id → [call_id] (dedup only; do not reuse as external_id)

Omit keys when a tag resolves blank (especially lander/visitor tags and email).


  • This webhook method is separate from the Meta Ads integration (ad‑account upload). Seeing “Meta Ads: Not configured” in Integration Reporting does not affect this webhook.
  • If Meta returns an “invalid Unix timestamp,” confirm event_time is [event_timestamp_unix_seconds] (real seconds).
  • If a field is empty in the request log, confirm the correct Add Tag was used and that the source value existed for that call.
  • To send the same conversion to multiple receivers, create a second webhook and attach both (see Related).