Business Ads Dataset
Updated: Sep 28, 2026
Copy for LLM
Ads in WhatsApp Status are available via the Marketing API. Learn more about ads in WhatsApp Status.
Datasets allow advertisers to connect and manage event data from web, app, store, and business messaging event sources to the Conversions API.
Datasets previously had to be created in Ads or Events Manager, or via specific tools like Facebook Login for Business or Meta Business Extension. The Datasets API allows programmatic management instead. With a direct Conversions API integration, you can create and manage datasets programmatically at scale.
Allowlist required: Partners’ and businesses’ app IDs must be allowlisted to use the Datasets API. Contact your Meta representative to be added to the allowlist.
Prerequisites
App permission
Your app must have the
business_management permission. More detailed information on permissions and access can be found in the Ad Permissions and Access documentation.Assets
You need access to these assets:
business_id: The business ID that datasets will be associated with.ad_account_id: The ad account ID owned by the same business associated with the dataset. More information in Ad Accounts - Business Management APIs.app_id: The app ID owned by the business associated with the dataset. More information in Apps - Business Management APIs.
Supported Conversions API channels
The Datasets API supports multiple types of Conversions API integrations:
- Conversions API for Web, to send web events.
- Conversions API for Offline, to send offline and physical store events.
- Conversions API for CRM, to send lead events from CRM systems.
- Conversions API for App, to send app events.
This API does not apply to Conversions API for Business Messaging. For that use case, refer to the developer documentation for dataset creation access.
Creating datasets
To create a dataset, make a
POST request to the {business-id}/ads_dataset endpoint with the following parameters:| Parameter | Description | Required |
|---|---|---|
name | string. The name of the dataset. | Yes |
ad_account_id | string. The ID of the ad account owned by the business that the dataset will be associated with. | No |
app_id | string. The ID of the app owned by the business, indicating whether the dataset is for App. Required for sending CAPI app events. | No |
is_crm | boolean. Whether the dataset is for CRM. Required for sending CAPI-CRM events. | No |
Example:
curl -X POST \
https://graph.facebook.com//{business-id}/ads_dataset \
-F 'name=My New Dataset' \
-F 'access_token=<ACCESS_TOKEN>'
Example for a CRM CAPI dataset:
curl -X POST \
https://graph.facebook.com//{business-id}/ads_dataset \
-F 'name=My New Dataset' \
-F 'is_crm=true' \
-F 'access_token=<ACCESS_TOKEN>'
Example for an App dataset:
curl -X POST \
https://graph.facebook.com//{business-id}/ads_dataset \
-F 'name=My New Dataset' \
-F 'app_id=23123348790' \
-F 'access_token=<ACCESS_TOKEN>'
Example for associating a dataset with an ad account:
curl -X POST \
https://graph.facebook.com//{business-id}/ads_dataset \
-F 'name=My New Dataset' \
-F 'ad_account_id=4523453334879' \
-F 'access_token=<ACCESS_TOKEN>'
Sample response
A successful response returns the ID of the newly created dataset:
{ "id": "23845678901234567" }
An unsuccessful response returns an error object with an explanation. Examples:
{ "error": { "message": "(#200) Permissions error", "type": "OAuthException", "code": 200, "fbtrace_id": "AGkghYUZC5qXod_iumMnoEc" } }
{ "error": { "message": "Invalid parameter", "type": "OAuthException", "code": 100, "error_subcode": 3858522, "is_transient": false, "error_user_title": "Ad Account Not Owned By Business", "error_user_msg": "The ad account id parameter needs to be owned by a business making the dataset api request", "fbtrace_id": "AGnio45BEnDSg8TnLODiHcI" } }
Error codes
The following error codes may be returned when creating a dataset:
| Subcode | Description |
|---|---|
1349004 | Your app does not have permission to create a dataset. |
2282001 | Invalid Business ID. Business ID not recognized. Try again. |
1690148 | There aren’t any ad accounts that match the ID that you entered. Check that you’ve entered the ad account ID correctly and try again. |
3858522 | The ad account id parameter needs to be owned by a business making the dataset api request. |
1349040 | Invalid App ID. The provided app ID does not look like a valid app ID. |
3858526 | The app id parameter needs to be owned by a business making the dataset api request. |
3858530 | App ID provided in the params is already associated with a dataset. You can only associate 1 app ID with 1 dataset. |
Reading datasets
To read datasets under a business, make a
GET request to the {business-id}/ads_dataset endpoint with the following parameters:| Parameter | Description | Required |
|---|---|---|
id_filter | string. Retrieve a list of matching datasets based on the dataset ID. | No |
name_filter | string. Retrieve a list of matching datasets based on the dataset name. Case insensitive. | No |
sort_by | enum. One of LAST_FIRED_TIME or NAME. Retrieve the list of datasets sorted by the applicable fields. | No |
Reading from this edge returns a JSON formatted result with
data and paging nodes, plus a summary node when requested via the summary param. For pagination details, see the Graph API guide. For summary, specify the fields to fetch in the summary param (like summary=total_count).Example:
curl -X GET \
https://graph.facebook.com//{business-id}/ads_dataset
Example for reading datasets with
id_filter:curl -X GET \
https://graph.facebook.com//{business-id}/ads_dataset?id_filter=211150265112369
Sample response
{ "data": [ { "name": "test Feb17", "dataset_id": "211150265112369", "id": "211150265112369" } ], "paging": { "cursors": { "before": "QVFIUjlPdWJvcV81VkMweHJqZAEFyOVFqSnUxcGZA4ZAVBiRElrM0k5bHppc2xZAN0o0dS10SC1ieU", "after": "QVFIUjlPdWJvcV81VkMweHJqZAEFyOVFqSnUxcGZA4ZAVBiRElrM0k5bHppc2xZAN0o0dS10SC1ieU" } } }
Dataset fields
To read information about a dataset, request the
{business-id}/ads_dataset endpoint with the following fields:| Field | Description |
|---|---|
id | ID of the dataset. |
name | string. The name of the dataset. |
dataset_id | string. Same as the ID of the dataset. |
creator | User. The user who created this dataset. |
owner_business | Business. ID of the business that owns this dataset, or null if the dataset has not been claimed by any business yet. |
creation_time | datetime. Time at which the dataset was created. |
is_unavailable | bool. Whether this dataset is unavailable. |
is_consolidated_container | bool. Whether this signal container has unified pixel and offline conversion data set. |
last_fired_time | datetime. Time at which the dataset was last fired. |
is_crm | bool. Whether the dataset is for CRM. |
owner_ad_account | object. The ad account owned by the business that the dataset is associated with. Contains account_id and id. |
enable_automatic_matching | bool. Whether automatic advanced matching is enabled for the dataset for identity matching purposes. |
is_created_by_business | bool. Whether the dataset was created by a business. |
automatic_matching_fields | list<enum>. Advanced matching fields enabled for automatic advanced matching. |
can_proxy | bool. Whether this dataset can proxy. |
code | string. Dataset code to be placed on the website. |
config | string. The configuration to use for uploads to this dataset. Format determined by the method of upload (for example UI or SDK). |
description | string. Description of the dataset. |
duplicate_entries | integer. Number of duplicate entries for this dataset. |
enable_auto_assign_to_accounts | bool. Whether the dataset is auto assigned and auto tracked for all accounts that the owner business owns. |
event_stats | string. Event stats of this dataset. |
event_time_max | integer. Latest entry of this dataset. |
event_time_min | integer. Earliest entry of this dataset. |
first_party_cookie_status | enum. First party cookie status indicating whether first party cookies can be set for this dataset. |
Example for reading datasets with a fields filter:
curl -X GET \
https://graph.facebook.com//{business-id}/ads_dataset?fields=id,dataset_id,name,is_consolidated_container
Sample response:
{
"data": [
{
"id": "505648222963903",
"dataset_id": "505648222963903",
"name": "Test 1",
"is_consolidated_container": true,
"is_crm": false,
"owner_ad_account": {
"account_id": "10222203672",
"id": "act_10222203672"
}
},
{
"id": "5056482111163903",
"dataset_id": "5056482111163903",
"name": "Test 2",
"is_consolidated_container": true,
"is_crm": true,
"owner_ad_account": {
"account_id": "10111103672",
"id": "act_10111103672"
}
}
],
"paging": {
"cursors": {
"before": "QVFIUk9VTU9VRkFtaGp3NG10bDBQNU5KNkJxYsssssl93ZA2U5aGljZAnRyOTRRZA3VnMDY5ZAmYtW",
"after": "QVFIUkNQU2hQeEh6clVRS1NBMVhMYsssFMc29CM09aREt2U3V0SG5NLU5UcE51aDh6ZAEVneGNZAc2"
},
"next": "https://graph.facebook.com/v27.0/10152172211222/ads_dataset?access_token=<ACCESS_TOKEN>"
}
}
Dataset edges
| Edge | Description |
|---|---|
assigned_users | Edge<AssignedUser>. Users assigned to this dataset. |
adaccounts | Edge<AdAccount>. Ad Accounts that have access to this dataset. |
customconversions | Edge<CustomConversion>. Custom conversions associated with this dataset. |
Error codes
The following error codes may be returned when reading datasets:
| Subcode | Description |
|---|---|
1349004 | Your app does not have permission to read datasets. |
2282001 | Invalid Business ID. Business ID not recognized. Try again. |
An unsuccessful response returns an error object. Examples:
{ "error": { "message": "(#200) Permissions error", "type": "OAuthException", "code": 200, "fbtrace_id": "AGkghYUZC5qXod_iumMnoEc" } }
{ "error": { "message": "Invalid parameter", "type": "OAuthException", "code": 100, "error_subcode": 1349004, "is_transient": false, "error_user_title": "Your app does not have permission to read datasets", "error_user_msg": "There was a problem with the parameters of the request.", "fbtrace_id": "AGnio41BEnDSg8TnLODiHcI" } }
Other resources
- Overview of the Graph API
- Ad Permissions and Access
- Assets:
- Supported channels:
- Business Help Center: