Skip to content
adscapi

Meta CAPI Payload Preview

The server-side request adscapi builds when you track() a purchase and Meta is configured. Secrets and hashed values show as placeholders.

Request

POST
Endpoint
https://graph.facebook.com/v21.0/{META_PIXEL_ID}/events?access_token={META_CAPI_TOKEN}
Headers
Content-Type: application/json
Body (purchase example)
{
  "data": [
    {
      "event_name": "Purchase",
      "event_time": 1739452800,
      "action_source": "website",
      "event_id": "order_1001",
      "user_data": {
        "em": [
          "<sha256(normalized-email)>"
        ],
        "ph": [
          "<sha256(e164-phone)>"
        ],
        "client_ip_address": "203.0.113.10",
        "fbc": "fb.1.1739452800.abcdef",
        "fbp": "fb.1.1739452800.1234567890"
      },
      "custom_data": {
        "transaction_id": "order_1001",
        "value": 49.99,
        "currency": "USD"
      }
    }
  ]
}

Verified against the library dispatcher (src/dispatchers/meta.ts). See the Meta setup guide for where to get each secret.

Required secrets

META_CAPI_TOKENMETA_PIXEL_ID

Meta activates when every secret is present. One missing key and the platform no-ops — the rest still receive the event.

Event-name mapping

Canonical eventMeta receives
page_viewPageView
leadLead
signup_startsignup_start (custom event passthrough)
signupCompleteRegistration
checkout_createdInitiateCheckout
purchasePurchase
reply_generatedreply_generated (custom event passthrough)
upgrade_clickedupgrade_clicked (custom event passthrough)

Good to know

  • Access token is sent as the access_token query parameter, not an Authorization header.
  • Hashed email/phone and client IP send only with adUserData consent; fbc/fbp only with adPersonalization consent.
  • Set META_TEST_EVENT_CODE to add a test_event_code field and watch events land in Events Manager's Test events tab.
  • Unmapped canonical events (signup_start, reply_generated, upgrade_clicked) pass through as custom event names.

Frequently Asked Questions

Related Tools

Discover more free tools to fix your tracking

Event Payload Playground

Pick a canonical conversion event, fill the fields, and see the exact JSON payload adscapi builds — before you write a line of code.

Try it now

PII Hash Previewer

Type a raw email or phone number and see the normalized value plus its SHA-256 hash — the exact rules adscapi applies per platform. Nothing leaves the browser.

Try it now

Platform Coverage Explorer

Search all 26 ad platforms adscapi dispatches to — support level, required secrets, and setup docs, always in sync with the library registry.

Try it now

Ready to track Meta conversions server-side?

adscapi is free and open source. Set your platform tokens, call track() once, and every configured Conversions API receives the event — hashed the way each platform expects.