Delete a Child Business Manager

This topic describes how to delete an existing Child Business Manager.

Note: Depending on if appsecret_proof is enabled on your app's settings, appsecret_proof might be needed as a parameter to each call you make. Refer to Securing Graph API Requests doc for how to set this option and how to generate appsecret_proof.

Delete an Existing Child Business Manager

  1. Fetch the Child Business Manager's system user access token, using the PARENT_BM_ADMIN_SYSTEM_USER_ACCESS_TOKEN.
  2. curl \
      -F 'id=<CHILD_BM_ID>' \
      -F 'app_id=<APP_ID>' \
      -F 'scope=ads_management,business_management' \
      -F 'access_token=<PARENT_BM_ADMIN_SYSTEM_USER_ACCESS_TOKEN>' \
      -F 'appsecret_proof=<APP_SECRET_PROOF>' \  // Optional, depending on your app's security settings
      https://graph.facebook.com/<API_VERSION>/<CHILD_BM_ID>/access_token
  3. Fetch all ad accounts for the Child Business Manager, using the CHILD_BM_SYSTEM_USER_ACCESS_TOKEN.
  4. Once you fetch the ad account, mark all campaigns under them as PAUSED. Otherwise, any delete call to a Child Business Manager with active campaigns under it won't succeed.
  5. curl -G \
      -d 'access_token=<CHILD_BM_SYSTEM_USER_ACCESS_TOKEN>' \
      -d 'appsecret_proof=<APP_SECRET_PROOF>' \  // Optional, depending on your app's security settings
      https://graph.facebook.com/<API_VERSION>/<CHILD_BM_ID>/owned_ad_accounts
    curl -G \
      -d 'access_token=<CHILD_BM_SYSTEM_USER_ACCESS_TOKEN>' \
      -d 'appsecret_proof=<APP_SECRET_PROOF>' \  // Optional, depending on your app's security settings
      https://graph.facebook.com/<API_VERSION>/<act_AD_ACCOUNT_ID>/campaigns
    curl \
      -F 'status=PAUSED' \
      -F 'access_token=<CHILD_BM_SYSTEM_USER_ACCESS_TOKEN>' \
      -F 'appsecret_proof=<APP_SECRET_PROOF>' \  // Optional, depending on your app's security settings
      https://graph.facebook.com/<API_VERSION>/<CAMPAIGN_ID>/
  6. Delete the Child Business Manager, using the PARENT_BM_ADMIN_SYSTEM_USER_ACCESS_TOKEN.
  7. curl -X DELETE \
      -d 'client_id=<CHILD_BM_ID>' \
      -d 'access_token=<PARENT_BM_ADMIN_SYSTEM_USER_ACCESS_TOKEN>' \
      -d 'appsecret_proof=<APP_SECRET_PROOF>' \  // Optional, depending on your app's security settings
      https://graph.facebook.com/<API_VERSION>/<PARENT_BM_ID>/owned_businesses