{
"data": [
{
"event_name": "Purchase",
"event_time": 1601673450,
"user_data": {
"em": "7b17fb0bd173f625b58636fb796407c22b3d16fc78302d79f0fd30c2fc2fc068",
"ph": null
},
"custom_data": {
"currency": "USD",
"value": "142.52"
}
}
]
}
```If you want to test your payload from the Payload Helper, add your Pixel ID under **Test this Payload** and click on **Send to Test Events**. You should be able to see the event on **Events Manager** > **Your Pixel** > **Test Events**. Learn more about the [Test Events Tool](/docs/marketing-api/conversions-api/using-the-api#testEvents). | Once you are satisfied with your payload, decide how you want to make your call. You can use our Graph API Explorer (see [Guide](/docs/graph-api/explorer/)) or your own servers. If you are using your servers, you can use CURL or the Meta Business SDK—We highly recommend [using the Meta Business SDK](/docs/business-sdk). Independently on your call method, you should call the `/{pixel_id}/events` endpoint and attach the JSON data generated by the Payload Helper. Once you make the call, you should get a response like this:```
{
"events_received": 1,
"messages": [],
"fbtrace_id": <FB-TRACE-ID>
}
``` |
After you complete your first call, verify your events on **Events Manager** > **Your Pixel** > **Overview**.
*Move on to [Send and Verify Events](#send-and-verify) once you have checked your test events in Events Manager.*
#### Send and Verify Events
To start sending events, make a `POST` request to the API's `/events` edge. Attach a payload to your call —if you need help generating your payload, visit the [Payload Helper](/docs/marketing-api/conversions-api/payload-helper). See the following resources for more information and code samples:
* [Using the API > Send requests](/docs/marketing-api/conversions-api/using-the-api#send)
* [Dropped Events](/docs/marketing-api/conversions-api/using-the-api#dropped-events)
* [Upload Time versus Event Transaction Time](/docs/marketing-api/conversions-api/using-the-api#event-transaction-time)
* [Batch Requests](/docs/marketing-api/conversions-api/using-the-api#batch-requests)
* [Hashing](/docs/marketing-api/conversions-api/using-the-api#hashing)
After you start sending events, go to Events Manager and confirm that we have received the events you sent. Learn how to [Verify Your Events](/docs/marketing-api/conversions-api/using-the-api#verify).
*If your implementation is complementary to a browser Pixel, move on to [deduplication settings](#add-parameters-for-dedup). Otherwise, you are all set! Check [Support](#support) if you still have questions.*
### Step 3: Add Parameters for Deduplication
If you're sending identical events from your Pixel and through the Conversions API, you need to set up deduplication for your events sent via both channels. First, read [developer documentation to understand the deduplication logic](/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events).
#### Event-based deduplication
If we find the same server key combination (`event_id`, `event_name`) and browser key combination (`eventID`, `event`) sent to the same Pixel ID within 48 hours, we discard the later sent duplicate events.
To help ensure your events are deduplicated:
* For the corresponding events, make sure the following parameters are set to the same value:
* `event_id` from your server event and `eventID` from your browser event
* `event_name` from your server and browser events
* After you send duplicate events, check Events Manager to see if the correct events are being dropped.
* Ensure that each unique event sent via both Pixel and Conversions API has its own `event_id`. This ID should not be shared with other events.
#### Alternative to event-based deduplication
While Event ID will always be the best way to deduplicate events, it's a fairly complex implementation. You can leverage alternative solutions by using external\_id or fbp parameters. If you have configured the external\_id or fbp parameters to be passed via both browser and server, we will deduplicate events automatically if we see the same event with same external\_id or fbp parameters within 48 hours.
### Optional Step 4: Explore [Business SDK Features](/docs/marketing-api/conversions-api/guides/business-sdk-features)
The Meta Business SDK has advanced features designed especially for Conversions API users:
* [Asynchronous Requests](/docs/marketing-api/conversions-api/guides/business-sdk-features#asynchronous-requests) — Use this feature if you do not want to block your program's execution to wait for a request to be completed. With this approach, you make your request and get a signal back from the server once it has been completed. While you wait for the response, the program can keep executing.
* [Concurrent Batching](/docs/marketing-api/conversions-api/guides/business-sdk-features#concurrent-batching) — Leverage asynchronous requests to increase throughput by utilizing resources more efficiently. Create batched requests to support use cases like event request workers, cron jobs, and more.
* [HTTP Service Interface](/docs/marketing-api/conversions-api/guides/business-sdk-features#http-service-interface) — Override the Business SDK's default HTTP service and implement your own custom service with your preferred method or library.
## Integration as a Platform
The following instructions are for partners offering conversions API as a service to advertisers.
### Step 1: Set Up Requirements
Your app should get the following features and permissions:
* Access Level: [Advanced Access](/docs/marketing-api/overview/authorization#layer-2--access-levels--permissions--and-features)
* Feature: [Ads Management Standard Access](/docs/marketing-api/overview/authorization)
* Permissions: [`ads_management`](/docs/permissions/reference/ads_management) and [`pages_read_engagement`](/docs/permissions/reference/pages_read_engagement) and [`ads_read`](/docs/permissions/reference/ads_read).
### Step 2: Send Events on Behalf of Clients
#### 1. Facebook Login for Business (Recommended for partners)
[Facebook Login for Business](/docs/facebook-login/facebook-login-for-business#opt-in-to-facebook-login-for-business) is the preferred authentication and authorization solution for Tech Providers and business app developers who need access to their business clients' assets. It allows you to specify the access token type, types of assets, and permissions your app needs, and save it as a set (configuration). You can then present the set to your business clients who can complete the flow and grant your app access to their business assets.
#### 2. Meta Business Extension
[Meta Business Extension](/docs/meta-business-extension/) returns all the necessary information needed to send events on behalf of the client via the following process. Meta Business Extension provides an endpoint to retrieve system user access tokens created in the client's Business Manager. This process includes permissions to send server events and is done automatically and in a secured way.
The endpoint requires the user access token as input parameter. For new Meta Business Extension users, call this endpoint the endpoint to fetch the system user access token after you finish setting up Meta Business Extension. Existing users need to ask for re-authentication before calling the new API endpoint.
Facebook Business Extension is currently only available to approved partners. If you are interested in becoming a partner, contact your Meta representative for access.
#### 3. Business On behalf Of: Client shares dataset to the partner's Business Manager
The client shares their dataset to the partner via Business Manager settings, see 'Client system user's access token' section or via [API through the On Behalf Of onboarding method](/docs/marketing-api/business-manager/guides/on-behalf-of/). You can assign the partner system user to the client pixel and generate an access token to send server events by manually creating a System User Access Token. This can be done via the Conversions API inside the pixel settings above. On the API side, you need to request access to the [client's ad account](/docs/marketing-api/business-asset-management/guides/business-to-business#managing-your-relationship-as-an-ad-agency-acting-on-behalf-of-another-business) managing the dataset and [proceed sharing pixels via API](/docs/marketing-api/business-asset-management/guides/business-pixel-sharing/).
#### 4. Client system user's access token
This is the similar onboarding flow for direct integration. You will have your client [manually create a System User Access Token](/docs/marketing-api/conversions-api/set-up-conversions-api-as-a-platform#option1) via the Conversions API inside the dataset settings. Then, you can send events to the advertiser's dataset with that token. A system user or an admin system user must install the app that will be used to generate the access token. With this setup, your app is allowed to call APIs on behalf of this system user or admin system user.
**Note**: If the partner system leverages this method, their token will be limited to sending data only to Meta. The token can't be used to run API GET data requests.
### Step 3: Attribute Events to Your Platform
To attribute conversions API events to your platform, use the `partner_agent` field. This allows you to set your own platform identifier when sending events on behalf of a client. If you are a managed partner, work with your Meta Representative to agree on an identifier for your platform. This value should be in a format that is less than 23 characters and includes at least two alphabetical characters. Then, send it with each server event.
Always provide an up-to-date setup guide for advertisers looking to activate the integration on your platform.
## Support
### For All Partners
[See information about debugging and Business Help Center articles](/docs/marketing-api/conversions-api/support).
### For Managed Partners
Provide the following information to your Meta Representative, so they can help with testing integrations and troubleshooting: Business Manager ID, App ID, Pixel IDs.
## API Documentation
* [Get started](/docs/marketing-api/conversions-api/get-started) - Test the API from your own Business Manager
* [Using the API](/docs/marketing-api/conversions-api/using-the-api)
* [Best Practices - Conversions API](/docs/marketing-api/conversions-api/best-practices)
* [Set Up Conversions API as a Platform](/docs/marketing-api/conversions-api/set-up-conversions-api-as-a-platform)
* [Standard Meta Events](/docs/facebook-pixel/implementation/conversion-tracking#standard-events)
* [Custom Meta Events](/docs/facebook-pixel/implementation/conversion-tracking#custom-events)
* [Parameters](/docs/marketing-api/conversions-api/parameters)
* [Payload Helper](/docs/marketing-api/conversions-api/payload-helper)
* [Data Processing Options for Conversions API and Offline Conversions API](/docs/marketing-api/conversions-api/using-the-api#data-processing-options-for-conversions-api-and-offline-conversions-api)
* [If you want to optimize for app events, use App Event API](/docs/marketing-api/app-event-api)
