Conversions API Gateway: Non-Web Server Events API Support

With v1.6.0 onwards, the Conversions API Gateway has started supporting the API endpoint where advertisers can send non-web events from their Server to the Conversions API Gateway. This is similar to the Conversions API direct method. The key difference is the event will flow through the Conversions API Gateway instead of sending events directly to the Meta Graph API.

Send Requests

To send new events, make a POST request to this API's /events edge from this path: https://<capig.instance.url>/capi/{PIXEL_ID}/events.

When you post to this edge, Meta creates new server events.

curl -i -X POST \
  -d '{
  "accessKey": "<ACCESS_KEY_VIA_CAPIG_UI>",
  "data": [
    {
      "event_name": "Purchase",
      "event_time": <Unix timestamp in seconds, must be within the last seven days>,
      "user_data": {
        "em": [
          "973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b"
        ],
        "ph": [
          "ce3a598687c8d2e5aa6bedad20e059b4a78cca0adad7e563b07998d5cd226b8c"
        ],
        "client_ip_address": "123.123.123.123",
        "client_user_agent": "CLIENT_USER_AGENT",
        "fbc": "fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
        "fbp": "fb.1.1558571054389.1098115397"
      },
      "contents": [
        {
          "id": "product123",
          "quantity": 1,
          "delivery_category": "home_delivery"
        }
      ],
      "custom_data": {
        "currency": "usd",
        "value": 123.45
      },
      "event_source_url": "http://test.com/product/123",
      "action_source": "website"
    }
  ]
}' \
https://<capig.instance.url>/capi/<PIXEL_ID>/events

Generating Access Key

An access key to send API requests to the Conversions API Gateway can be generated from the Conversions API Gateway’s admin console.

  • Log in to the Conversions API Gateway Admin UI
  • Go to Overview section
  • Click “...” from the Connected Meta Pixel row you want to generate an access key
  • Click on Generate Access Key

An access token for Conversions API Direct cannot be used for making server requests to the Conversions API Gateway endpoint.