Skip to content

Create an ad set

POST /api/marketing/adsets

Creates the ad set in Meta and returns the object reread. Without status it is created PAUSED. daily_budget and lifetime_budget are mutually exclusive (400 if both are sent) and a lifetime_budget requires end_time (400 if missing). Amounts are in cents of the account currency. targeting is sent as an object and Neike serializes it to JSON. The valid combination of billing_event, optimization_goal and the campaign objective is validated by Meta on the server side and is not fully published: Neike only validates that each value belongs to its enum and returns Meta’s error, mapped. Requires the marketing:manage scope.

FieldTypeDescription
ad_account_idstringrequiredMeta ad account, with prefix. Example: "act_123".
campaign_idstringrequiredCampaign the ad set belongs to.
namestringrequiredExample: "AR 25-45 · feed".
statusACTIVE · PAUSED · DELETED · ARCHIVEDoptionalIf omitted, the ad set is created PAUSED. Default: "PAUSED".
daily_budgetnumberoptionalDaily budget in cents. Mutually exclusive with lifetime_budget. Example: 50000.
lifetime_budgetnumberoptionalLifetime budget in cents. Mutually exclusive with daily_budget and requires end_time.
billing_eventAPP_INSTALLS · CLICKS · IMPRESSIONS · LINK_CLICKS · NONE · OFFER_CLAIMS · PAGE_LIKES · POST_ENGAGEMENT · THRUPLAY · PURCHASE · LISTING_INTERACTIONoptional—
optimization_goalNONE · APP_INSTALLS · AD_RECALL_LIFT · ENGAGED_USERS · EVENT_RESPONSES · IMPRESSIONS · LEAD_GENERATION · QUALITY_LEAD · LINK_CLICKS · OFFSITE_CONVERSIONS · PAGE_LIKES · POST_ENGAGEMENT · QUALITY_CALL · REACH · LANDING_PAGE_VIEWS · VISIT_INSTAGRAM_PROFILE · ENGAGED_PAGE_VIEWS · VALUE · THRUPLAY · DERIVED_EVENTS · APP_INSTALLS_AND_OFFSITE_CONVERSIONS · CONVERSATIONS · IN_APP_VALUE · MESSAGING_PURCHASE_CONVERSION · MESSAGING_DEEP_CONVERSATION_AND_FOLLOW · SUBSCRIBERS · REMINDERS_SET · MEANINGFUL_CALL_ATTEMPT · PROFILE_VISIT · PROFILE_AND_PAGE_ENGAGEMENT · ADVERTISER_SILOED_VALUE · AUTOMATIC_OBJECTIVE · MESSAGING_APPOINTMENT_CONVERSIONoptional—
bid_amountnumberoptionalBid in cents.
bid_strategyLOWEST_COST_WITHOUT_CAP · LOWEST_COST_WITH_BID_CAP · COST_CAP · LOWEST_COST_WITH_MIN_ROASoptional—
start_timestringoptionalExample: "2026-09-01T00:00:00-0300".
end_timestringoptionalExample: "2026-09-30T23:59:59-0300".
targetingobjectoptionalTargeting. It is sent as an object and Neike serializes it to JSON before sending it to Graph. Example: {"geo_locations":{"countries":["AR"]},"age_min":25,"age_max":45,"publisher_platforms":["facebook","instagram"]}.
promoted_objectobjectoptional{page_id}, {application_id, object_store_url} or {pixel_id}.
dsa_payorstringoptionalDeclared payor (European DSA).
dsa_beneficiarystringoptionalDeclared beneficiary (European DSA).
StatusDescriptionSchema
201—AdSetDto
Terminal window
curl -X POST https://api.neike.dev/api/marketing/adsets \
-H "x-neike-api-key: whk_live_…" \
-H "Content-Type: application/json" \
-d '{
"ad_account_id": "act_123",
"campaign_id": "string",
"name": "AR 25-45 · feed"
}'
FieldTypeDescription
idstringrequiredExample: "120210000000000000".
namestringrequiredExample: "AR 25-45 · feed".
campaign_idstringoptionalExample: "120210000000000000".
statusACTIVE · PAUSED · DELETED · ARCHIVEDoptional—
effective_statusstringoptionalStatus computed by Meta, read-only.
daily_budgetstringoptionalDaily budget in cents. Example: "50000".
lifetime_budgetstringoptionalLifetime budget in cents.
billing_eventAPP_INSTALLS · CLICKS · IMPRESSIONS · LINK_CLICKS · NONE · OFFER_CLAIMS · PAGE_LIKES · POST_ENGAGEMENT · THRUPLAY · PURCHASE · LISTING_INTERACTIONoptional—
optimization_goalNONE · APP_INSTALLS · AD_RECALL_LIFT · ENGAGED_USERS · EVENT_RESPONSES · IMPRESSIONS · LEAD_GENERATION · QUALITY_LEAD · LINK_CLICKS · OFFSITE_CONVERSIONS · PAGE_LIKES · POST_ENGAGEMENT · QUALITY_CALL · REACH · LANDING_PAGE_VIEWS · VISIT_INSTAGRAM_PROFILE · ENGAGED_PAGE_VIEWS · VALUE · THRUPLAY · DERIVED_EVENTS · APP_INSTALLS_AND_OFFSITE_CONVERSIONS · CONVERSATIONS · IN_APP_VALUE · MESSAGING_PURCHASE_CONVERSION · MESSAGING_DEEP_CONVERSATION_AND_FOLLOW · SUBSCRIBERS · REMINDERS_SET · MEANINGFUL_CALL_ATTEMPT · PROFILE_VISIT · PROFILE_AND_PAGE_ENGAGEMENT · ADVERTISER_SILOED_VALUE · AUTOMATIC_OBJECTIVE · MESSAGING_APPOINTMENT_CONVERSIONoptional—
bid_amountstringoptionalBid in cents.
bid_strategyLOWEST_COST_WITHOUT_CAP · LOWEST_COST_WITH_BID_CAP · COST_CAP · LOWEST_COST_WITH_MIN_ROASoptional—
start_timestringoptionalExample: "2026-09-01T00:00:00-0300".
end_timestringoptionalExample: "2026-09-30T23:59:59-0300".
targetingobjectoptionalTargeting as stored by Meta.
promoted_objectobjectoptionalPromoted object (page, app or pixel).
created_timestringoptional—
updated_timestringoptional—