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.
Field Type Description ad_account_idstring required Meta ad account, with prefix. Example: "act_123". campaign_idstring required Campaign the ad set belongs to. namestring required Example: "AR 25-45 · feed". statusACTIVE · PAUSED · DELETED · ARCHIVEDoptional If omitted, the ad set is created PAUSED. Default: "PAUSED". daily_budgetnumber optional Daily budget in cents. Mutually exclusive with lifetime_budget. Example: 50000. lifetime_budgetnumber optional Lifetime 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_amountnumber optional Bid in cents. bid_strategyLOWEST_COST_WITHOUT_CAP · LOWEST_COST_WITH_BID_CAP · COST_CAP · LOWEST_COST_WITH_MIN_ROASoptional — start_timestring optional Example: "2026-09-01T00:00:00-0300". end_timestring optional Example: "2026-09-30T23:59:59-0300". targetingobject optional Targeting. 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_objectobject optional {page_id}, {application_id, object_store_url} or {pixel_id}.dsa_payorstring optional Declared payor (European DSA). dsa_beneficiarystring optional Declared beneficiary (European DSA).
curl -X POST https://api.neike.dev/api/marketing/adsets \
-H " x-neike-api-key: whk_live_… " \
-H " Content-Type: application/json " \
"ad_account_id": "act_123",
"name": "AR 25-45 · feed"
Field Type Description idstring required Example: "120210000000000000". namestring required Example: "AR 25-45 · feed". campaign_idstring optional Example: "120210000000000000". statusACTIVE · PAUSED · DELETED · ARCHIVEDoptional — effective_statusstring optional Status computed by Meta, read-only. daily_budgetstring optional Daily budget in cents. Example: "50000". lifetime_budgetstring optional Lifetime 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_amountstring optional Bid in cents. bid_strategyLOWEST_COST_WITHOUT_CAP · LOWEST_COST_WITH_BID_CAP · COST_CAP · LOWEST_COST_WITH_MIN_ROASoptional — start_timestring optional Example: "2026-09-01T00:00:00-0300". end_timestring optional Example: "2026-09-30T23:59:59-0300". targetingobject optional Targeting as stored by Meta. promoted_objectobject optional Promoted object (page, app or pixel). created_timestring optional — updated_timestring optional —