The first step in launching an ad campaign is to create the campaign itself using the API.
To create an ad campaign, send a POST
request to the /act_<AD_ACCOUNT_ID>/campaigns
endpoint with key parameters including the campaign's name
, objective
, and status
.
Example API Request:
curl -X POST \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/campaigns \
-F 'name=My Campaign' \
-F 'objective=LINK_CLICKS' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>'
Name | Description |
---|---|
| The name of the campaign. |
| The goal of the campaign, for example, |
| The initial status of the campaign, usually set to |