POST /ads/adsets

Create an ad set in a campaign: targeting, budget (unless the campaign has one), schedule, optimization goal. PAUSED by default; requires confirm: true

POST
/ads/adsets

Authorization

BearerAuth
headerAuthorizationBearer <token>

API key sk_...

Request Body

application/json
  1. body
accountId*string

Connected Facebook Page account id

adAccountId*string

Ad account id (act_...)

confirm*boolean

Required (true) for anything that can spend: creates (campaign, ad set, ad, boost), status ACTIVE, budget, bid, schedule or targeting changes. Without it: 400 confirmation_required, nothing is created

campaignId*string
name*string
dailyBudget?integer

Daily budget, in the ad account currency's minor units (cents)

Range100 <= value
lifetimeBudget?integer

Lifetime budget (needs endTime), in the ad account currency's minor units (cents)

Range100 <= value
startTime?string
Formatdate-time
endTime?string
Formatdate-time
optimizationGoal?string

Default LINK_CLICKS

billingEvent?string

Default IMPRESSIONS

bidAmount?integer

Bid cap, in the ad account currency's minor units (cents)

Range100 <= value
bidStrategy?string
targeting?

Simplified targeting, mapped to Meta's targeting spec

promotedObject?
destinationType?string
status?string

PAUSED (default) or ACTIVE (only together with confirm: true)

Value in"PAUSED""ACTIVE"

Response Body

{adSet, mock}

application/json
  1. response
adSet?
mock?boolean
Example Request
curl -X POST 'https://example.com/api/v1/ads/adsets' \  -H 'Content-Type: application/json' \  -d '{  "accountId": "string",  "adAccountId": "string",  "confirm": true,  "campaignId": "string",  "name": "string"}'
Example Response
{  "adSet": {},  "mock": true}