How to access all draft campaigns with the Facebook marketing API?
Solution 1:
I believe the only way to get draft campaigns is below:
- You should get all
addrafts
. On my account I have only 1 addraft that contains all draft campaigns, but maybe you can have more. URL for gettingaddrafts
:
https://graph.facebook.com/v12.0/act_<ad_account_id>/addrafts?access_token=<access_token>&fields=name,ad_object_id,id
- Now you can get
addraft_fragments
. You can see all draft fragments of your ad_account (campaigns, adsets, ads), but you can easily find here what you want. URL for gettingaddraft_fragments
:
https://graph.facebook.com/v12.0/<addraft_id>/addraft_fragments?access_token=<access_token>&fields=name,id,ad_object_id,ad_object_type,budget,ad_object_name,values