block_list_management_v2_api_access capability grant.block_list_drafts edge of a business node and specifying the block list file in the publisher_urls_file parameter:CURL POST \ -F "publisher_urls_file=@path/to/local/file.txt" \ -F "access_token=<ACCESS_TOKEN>" \ https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/block_list_drafts
{"id":<BLOCK_LIST_DRAFT_ID>}
block_list_draft node with async_job_status and async_percent_completion fields:CURL -X GET \ "https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_DRAFT_ID>?fields=async_job_status,async_percent_completion&access_token=<ACCESS_TOKEN>"
{"id":<BLOCK_LIST_DRAFT_ID>, "async_job_status":"running", "async_percent_completion":80}
curl \ -F "draft_id=<BLOCK_LIST_DRAFT_ID>" \ -F "name=<BLOCK_LIST_NAME>" \ -F "access_token=<ACCESS_TOKEN>" \ https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/publisher_block_lists
{"id":<BLOCK_LIST_ID>}
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
name | string | Y | Name for the block list. |
draft_id | fbid | Y | ID of the draft block list. |
publisher_block_lists edge of a business node using the draft ID from the previous step:curl \ POST -F "block_list_id=<EXISTING_BLOCK_LIST_ID>" \ -F "draft_id=<BLOCK_LIST_DRAFT_ID>" \ -F "name=<BLOCK_LIST_NAME>" \ -F "access_token=<ACCESS_TOKEN>" \ https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/publisher_block_lists
{"id":<BLOCK_LIST_ID>}
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
name | string | Y | Name for the block list. |
draft_id | fbid | Y | ID of the draft block list. |
block_list_id | fbid | N | ID of the block list to update. |
publisher_block_lists edge:curl -X GET \ "https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>?fields=id,name,last_update_user,last_update_time,business_owner_id,owner_ad_account_id,items_count,web_publishers,app_publishers&access_token=<ACCESS_TOKEN>"
{ "id": "<BLOCK_LIST_ID>", "name": "new-bl", "last_update_user": "<USER_ID>", "last_update_time": "2023-05-24T04:36:05+0000", "business_owner_id": "<BUSINESS_ID>", "items_count": 9963, "web_publishers": [ { "domain_url": "rare.us", "publisher_name": "rare.us", "id": "<PUBLISHER_ID>" }, { "domain_url": "gay.nz", "publisher_name": "gay.nz", "id": "<PUBLISHER_ID>" } ] }
| Parameter | Type | Required (Y/N) | Description |
|---|---|---|---|
id | fbid | Y | ID of the block list. |
name | string | Y | Name for the block list. |
last_update_user | fbid | Y | ID of the user who last updated the block. list. |
last_update_time | timestamp | Y | Time the block list was last updated. |
business_owner_id | fbid | Y | ID of the business owner if the blocklist is shared to a business. |
owner_ad_account_id | fbid | Y | ID of the ad account who owners this blocklist. |
items_count | integer | N | Number of items in block list. |
web_publishers | list | N | List of blocked web domains or Facebook page URLs. |
app_publishers | list | N | List of blocked app store URLs. |
publisher_block_lists edge:curl -X DELETE \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/?access_token=<ACCESS_TOKEN>"
agencies edge:curl \
-F "agency_id=<BUSINESS_ID>" \
-F "permitted_roles=['<ROLE>']" \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/agencies/?access_token=<ACCESS_TOKEN>"
agencies edge:curl \
-X DELETE \
-F "agency_id=<BUSINESS_ID>" \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/agencies/?access_token=<ACCESS_TOKEN>"
agencies edge:curl \
-X GET \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/agencies/?access_token=<ACCESS_TOKEN>"
assigned_users edge:curl \ POST
-F "user=<BUSINESS_SCOPED_USER_ID>" \
-F "permitted_roles=['<ROLE>']" \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/assigned_users/?access_token=<ACCESS_TOKEN>"
{"access_status":"CONFIRMED"}
assigned_users edge:curl \
-X DELETE \
-F "user=<BUSINESS_SCOPED_USER_ID>" \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/assigned_users/?access_token=<ACCESS_TOKEN>"
assigned_users edge:curl \
-X GET \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/assigned_users/?business_id=<BUSINESS_ID>&access_token=<ACCESS_TOKEN>"
curl -X POST \
-F "account_id=<ACCOUNT_ID>" \
-F "business_id=<BUSINESS_ID>" \
-F "is_auto_blocking_on=*true*" \
-F "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/auto_applied_ad_accounts"
{"id":"<BLOCK_LIST_ID>"}
curl -X POST \
-F "account_id=<ACCOUNT_ID>" \
-F "business_id=<BUSINESS_ID>" \
-F "is_auto_blocking_on=*false*" \
-F "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/auto_applied_ad_accounts"
{"id":"<BLOCK_LIST_ID>"}
auto_applied_ad_accounts edge:curl -X GET \
"https://graph.facebook.com/<API_VERSION>/<BLOCK_LIST_ID>/auto_applied_ad_accounts/?access_token=<ACCESS_TOKEN>"
{"data":[{"id":"act_<ACCOUNT_ID>"},{"id":"act_<ACCOUNT_ID>"},...]}
| Code | Subcode | Description |
|---|---|---|
100 | Invalid Parameter | |
2349019 | Invalid Platform And Position Parameter Combination. | |
2349020 | Both Start Date And End Date Required. | |
2349022 | Start Date Out Of Range. | |
2349023 | End Date Out Of Range. | |
2349024 | Start Date Or End Date Out Of Range. | |
2349025 | Start Date Must Be Earlier Than End Date. | |
200 | Permissions error. | |
80011 | There have been too many calls to Brand Safety APIs. Wait a bit and try again. |
fbtrace_id: Internal support identifier. When reporting a bug related to a Graph API call, include the fbtrace_id to help us find log data for debugging