Question

Does FB Ads Api allow updating the start time of an existing but not yet live campaign?

It is possible to change start time through the Facebook Ads Manager UI, but the API documentation has only support for updating end_time and not start_time: https://developers.facebook.com/docs/reference/ads-api/adcampaign/#update

Sample Use Case Scenario:

  • Assume, today is December 16
  • An existing Campaign is scheduled to start on Dec 25
  • User wants to launch the campaign a few days earlier on Dec 23

Is it possible to adjust the start time in this scenario through the API?

It would be nice to do so, instead of workaround of deleting the campaign and re-creating a campaign with same data but with a different start time.

Was it helpful?

Solution

It is possible to update the start_time of an adcampaign as long as the current time is below the start_time of the campaign.

Once a campaign has become active, it is no longer possible to update the start_time field.

I just tested creating and updating a post-dated campaign:

curl \
-F "name=TestTimeUpdate" \
-F "daily_budget=100" \
-F "campaign_status=1" \
-F "start_time=2014-01-24 12:00:00" \
-F "end_time=2014-01-25 12:00:00" \
-F "access_token=____" \
"https://graph.facebook.com/act_1234/adcampaigns"

{"id":"5678"}

Get the date fields:

curl "https://graph.facebook.com/5678?fields=start_time,end_time&access_token=____"

{
  "start_time": "2014-01-24T12:00:00+0000",
  "end_time": "2014-01-25T12:00:00+0000",
  "id": "5678"
}

Update the date fields:

curl \
-F "start_time=2014-01-23 12:00:00" \
-F "access_token=____" \
"https://graph.facebook.com/5678"

true

Get the update:

curl "https://graph.facebook.com/5678?fields=start_time,end_time&access_token=____"
{
  "start_time": "2014-01-23T12:00:00+0000",
  "end_time": "2014-01-25T12:00:00+0000",
  "id": "5678"
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top