brand_safety_third_party_partners capability grant.| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
name | string | Y | Name of the Content Allow List to create. |
POST request to the dynamic_content_sets edgecurl -X POST -F "name=hello_world" -F "access_token=<ACCESS_TOKEN>" "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/create_dynamic_content_set"
{"id": "<CONTENT_ALLOW_LIST_ID>"}
{ "success": "false", "error_message": "You can only create {max_business_dcs_creation_allowed} content allow lists for each business. To create a new list, try deleting some of your existing lists." }
DELETE request to the given Content Allow List:curl -X DELETE -F "access_token=<ACCESS_TOKEN>" "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>"
{"success": "true"}
{ "success": "false", "error_message": "Cannot delete a Content Allow List which is in use." }
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
id | fbid | Y | ID of each Content Allow List. |
name | string | Y | Name of the Content Allow List. |
business_id | fbid | Y | Business Manager account that owns the Content Allow List. |
GET request to the dynamic_content_sets edge:curl -X GET "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/dynamic_content_sets?fields=id,name,business_id&access_token=<ACCESS_TOKEN>"
{ "data": [ { "id": "<CONTENT_ALLOW_LIST_ID>", "name": "CAL example 1", "business_id": "<BUSINESS_ID>" }, { "id": "<CONTENT_ALLOW_LIST_ID>", "name": "CAL example 2", "business_id": "<BUSINESS_ID>" } ] }
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
id | fbid | Y | ID of each Content Allow List. |
name | string | Y | Name of the Content Allow List. |
business_id | fbid | Y | Business Manager account that owns the Content Allow List. |
GET request to the <CONTENT_ALLOW_LIST_ID> edge:curl -X GET "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>?fields=id,name,business_id&access_token=<ACCESS_TOKEN>"
{ "id": "<CONTENT_ALLOW_LIST_ID>", "name": "CAL example 1", "business_id": "<BUSINESS_ID>" }
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
video_id | fbid | Y | ID of the video. |
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
total_count | integer | N | Total number of videos in the Content Allow List. |
GET request to the <CONTENT_ALLOW_LIST_ID>/video_ids edge:curl -X GET "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>/video_ids?summary=total_count&limit=<9000>&access_token=<ACCESS_TOKEN>"
{ "data": [ { "video_id": "111" }, { "video_id": "222" }, { "video_id": "333" }, ... ], "summary": { "total_count": 1000 } }
POST request to the <CONTENT_ALLOW_LIST_ID> edge:curl -X POST -F "name=hello_world" -F "access_token=<ACCESS_TOKEN>" "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>"
{"success":true}
curl -X GET "https://graph.facebook.com/<API_VERSION>/<PAGE_ID>/videos?fields=ad_breaks_enabled,published,id&access_token=<ACCESS_TOKEN>"
curl -X GET "https://graph.facebook.com/<API_VERSION>/<PAGE_ID>/videos?fields=ad_breaks_enabled,published,id&since=<UNIX_TIMESTAMP>&access_token=<ACCESS_TOKEN>"
{ "data": [ { "ad_breaks_enabled": true, "published": true, "id": "<VIDEO_ID>" }, { "ad_breaks_enabled": false, "published": true, "id": "<VIDEO_ID>" } ] }
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
video_ids | list fbid | Y | List of video IDs (max 1,000 per call; max 2,000,000 per Content Allow List) |
POST request to the add_videos edge:curl -X POST -F "video_ids=[<VIDEO_ID>, <VIDEO_ID>, ...]" -F "access_token=<ACCESS_TOKEN>" "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>/add_videos"
{"success":true}
{"error": { "message": "Some videos failed to add into content allow list", "type": "OAuthException", "code": 61000, "error_data": { "failed_video_ids": [ 1234 ], "processed_videos": 1 }, "error_subcode": 2349007, "is_transient": false, "error_user_title": "CAL Add Video Failed", "error_user_msg": "Failed to add videos into Content Allow List.", } }
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
video_ids | list fbid | Y | List of video IDs (max 1,000 per call; max 2,000,000 per Content Allow List) |
DELETE request to the videos edge:curl -X DELETE -F "video_ids=[<VIDEO_ID>, <VIDEO_ID>, ...]" -F "access_token=<ACCESS_TOKEN>" "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>/videos"
{"success":true}
{ "error": { "message": "Some videos failed to remove from content allow list", "type": "OAuthException", "code": 61002, "error_data": { "failed_video_ids": [ 123 ] }, "error_subcode": 2349006, "is_transient": false, "error_user_title": "CAL Remove Video Failed", "error_user_msg": "Failed to remove videos from Content Allow List.", } }
GET request to the contains edge:curl -X GET "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>?fields=contains.video_id(<VIDEO_ID>)&access_token=<ACCESS_TOKEN>"
{"contains": true, "id": "<Content Allow List_ID>"}
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
ad_account_id | fbid | Y | ID of the ad account |
POST request to the apply_to_ad_accounts edge:curl -X POST -F "ad_account_id=<ACCOUNT_ID>" -F "access_token=<ACCESS_TOKEN>" "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>/apply_to_ad_accounts"
{"success": true}
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
ad_account_id | fbid | Y | ID of the ad account |
DELETE request to the unapply_to_ad_accounts edge:curl -X DELETE -F "ad_account_id=<ACCOUNT_ID>" -F "access_token=<ACCESS_TOKEN>" "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>/unapply_to_ad_accounts"
{"success":true}
GET request to the applied_ad_accounts edge:curl -X GET "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>/applied_ad_accounts?access_token=<ACCESS_TOKEN>"
{ "data": [ { "id": "act_<ACCOUNT_ID>" }, { "id": "act_<ACCOUNT_ID>" }, ... ] }
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
business_id | fbid | Y | ID of the Business Manager account |
POST request to the agency edge:curl -X POST -F "agency_id=<BUSINESS_ID>" -F "access_token=<ACCESS_TOKEN>" "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>/agencies"
{"success":true}
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
business_id | fbid | Y | ID of the Business Manager account |
DELETE request to the agencies edge:curl -X DELETE -F "agency_id=<BUSINESS_ID>" -F "access_token=<ACCESS_TOKEN>" "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>/agencies"
{"success":true}
GET request to the agency edge:curl -X GET "https://graph.facebook.com/<API_VERSION>/<CONTENT_ALLOW_LIST_ID>/agencies?access_token=<ACCESS_TOKEN>"
{ "data": [ { "id": "<BUSINESS_ID>", "name": "business name 1" }, { "id": "<BUSINESS_ID>", "name": "business name 2" }, ... ] }
| Code | Subcode | Description |
|---|---|---|
2349013 | In order to be able to delete a CAL, it should not be applied to any ad accounts | |
2349055 | You can only create {max_business_dcs_creation_allowed} content allow lists for each business. To create a new list, try deleting some of your existing lists. | |
2349006 | Failed to remove videos from Content Allow List. | |
2349007 | Failed to add videos into Content Allow List. | |
200 | Permissions error. | |
80011 | There have been too many calls to Brand Safety APIs. Wait a few minutes and try again. |