You can get, add and delete assets from an business asset group. This includes ad accounts, pages, Facebook pixels, offline event sets, app, catalogs, Instagram accounts and custom conversions.
Manage your business' asset groups and learn how to connect your business users to asset groups. Business asset groups help large advertisers or agencies efficiently manage users and assets in their business. You should organize assets and users in a way that maps to real-world operations. For example, a business can structure its assets and users according to brand, region, client, or an organizing principle of their choice.
To get a list of all Facebook pages that are in a business asset group:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pages?access_token=<ACCESS_TOKEN>"
The response looks like this:
{ "data": [ { "name": "Sample Name", "id": "<ID>" }, { "name": "Another Name", "id": "<ID>" }, { "name": "Third Name", "id": "<ID>" } ], .... }
You can add a page to a business asset group. You can add owned pages or shared pages:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pages?asset_id=<PAGE_ID>&access_token=<ACCESS_TOKEN>"
On success, we return true
.
To remove a page from a business asset group:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pages?asset_id=<PAGE_ID>&access_token=<ACCESS_TOKEN>"
On success, we return true
.
Business asset groups can contain either owned or shared ad accounts. To see all the accounts in a group:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_adaccounts?access_token=<ACCESS_TOKEN>"
The response looks like this:
{ "data": [ { "account_id": "<ID>", "id": "act_<ID>" }, { "account_id": "<ID>", "id": "act_<ID>" }, { "account_id": "<ID>", "id": "act_<ID>" } ], .... } } }
To add an ad account to a business asset group:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_adaccounts?asset_id=<AD_ACCOUNT_ID>&access_token=<ACCESS_TOKEN>"
To remove an ad account from a business asset group:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_adaccounts?asset_id=<AD_ACCOUNT_ID>&access_token=<ACCESS_TOKEN>"
You can add either owned or shared product catalogs to a business asset group. To see all catalogs in a group:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_product_catalogs?access_token=<ACCESS_TOKEN>"
The response looks like this:
{ "data": [ { "id": "<ID>", "name": "1 product catalog" }, { "id": "<ID>", "name": "First_Catalog_Products" } ], .... }
To add a catalog to a business asset group:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_product_catalogs?asset_id=<CATALOG_ID>&access_token=<ACCESS_TOKEN>"
On success, we return true
. To remove a catalog from a business asset group:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_product_catalogs?asset_id=<CATALOG_ID>&access_token=<ACCESS_TOKEN>"
You can add shared or owned Instagram Accounts to a business asset group. To get a list of existing accounts:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_instagram_accounts?access_token=<ACCESS_TOKEN>"
The response looks like this:
{ "data": [ { "id": "<ID>" }, { "id": "<ID>" } ], .... }
To add an Instagram Account to a business asset group:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_instagram_accounts?asset_id=<INSTAGRAM_ACCOUNT_ID>&access_token=<ACCESS_TOKEN>"
On success, we return true
.
To remove an account from a business asset group:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_instagram_accounts?asset_id=<ID>&access_token=<ACCESS_TOKEN>"
You can add or remove owned and shared pixels in business asset groups. To see all existing pixels in a business asset group:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pixels?access_token=<ACCESS_TOKEN>"
The response looks like this:
{ "data": [ { "id": "<ID>" }, { "id": "<ID>" } ], .... } } }
To add a pixel to a business asset group:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pixels?asset_id=<PIXEL_ID>&access_token=<ACCESS_TOKEN>"
On success, we return true
.
To remove a pixel from a business asset group:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pixels?asset_id=<PIXEL_ID>&access_token=<ACCESS_TOKEN>"
Business asset groups can contains both shared and owned offline event datasets. To see all datasets in a business asset group:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_offline_conversion_data_sets?access_token=<ACCESS_TOKEN>"
The response looks like this:
{ "data": [ { "id": "<ID>", "name": "Transfer", "business": { "id": "<ID>", "name": "Acme Industries Inc." }, "enable_auto_assign_to_accounts": false, "is_restricted_use": false }, { "id": "<ID>", "name": "Default Offline Event Set For Biz1", "business": { "id": "<ID>", "name": "Biz1" }, "enable_auto_assign_to_accounts": true, "is_restricted_use": false } ], .... }
To add offline event sets to a business asset group:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_offline_conversion_data_sets?asset_id=<EVENT_SET_ID>&access_token=<ACCESS_TOKEN>"
On success, we return true
.
To remove an event set from a business asset group:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_offline_conversion_data_sets?asset_id=<EVENT_SET_ID>&access_token=<ACCESS_TOKEN>"
To get all shared and owned apps in a business asset group:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_applications?access_token=<ACCESS_TOKEN>"
The response:
{ "data": [ { "category": "Games", "link": "/instantgames/<ID>/", "name": "testing again", "id": "<ID>" }, { "category": "Lifestyle", "link": "https://www.facebook.com/games/?app_id=<ID>", "name": "AccountKitTest", "id": "<ID>" } ], .... }
To add an app to a business asset group:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_applications?asset_id=<APP_ID>&access_token=<ACCESS_TOKEN>"
To remove an app from a business asset group:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_applications?asset_id=<APP_ID>&access_token=<ACCESS_TOKEN>"
When you either add or remove an app successfully, we return true
.
To see all owned and shared custom conversions data sets in a business asset group:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_custom_conversions?access_token=<ACCESS_TOKEN>"
The response:
{ "data": [{ "data": [ { "id": "<ID>" }, { "id": "<ID>" } ], .... }
To add custom conversions to a business asset group:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_custom_conversions?asset_id=<CUSTOM_CONVERSIONS_DATA_SET_ID>&access_token=<ACCESS_TOKEN>"
To delete custom conversions from a business asset group:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_custom_conversions?asset_id=<CUSTOM_CONVERSIONS_DATA_SET_ID>&access_token=<ACCESS_TOKEN>"
When you successfully add or remove an custom conversions, we return true
.