Sending Offline Events From a Server

With v1.6.0 onwards, the Conversions API Gateway supports an API endpoint that allows advertisers to send non-web (offline) 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 '{
  "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