ads_create_adset
Create a targeted ad set under a campaign by defining budget, audience, optimization goal, and scheduling preferences.
Instructions
Create an ad set under a campaign.
Args: account_id: Parent ad account. campaign_id: Parent campaign. daily_budget_cents: Daily budget in cents (use this OR lifetime_budget_cents). lifetime_budget_cents: Total budget for the entire run (requires end_time). optimization_goal: REACH, IMPRESSIONS, LINK_CLICKS, OFFSITE_CONVERSIONS, LANDING_PAGE_VIEWS, MESSAGES, LEAD_GENERATION, CONVERSATIONS, etc. billing_event: IMPRESSIONS (most common), LINK_CLICKS, etc. targeting: Full targeting JSON (geo, age, interests, custom audiences). promoted_object: For conversion campaigns: {"pixel_id": ..., "custom_event_type": ...}. destination_type: WEBSITE, APP, MESSENGER, INSTAGRAM_DIRECT, ON_AD, etc. start_time / end_time: ISO 8601 timestamps. adset_schedule: Day-parting blocks. Each block: {"days": [0..6], "start_minute": 0..1440, "end_minute": 0..1440, "timezone_type": "USER"|"ADVERTISER"}. Requires pacing_type=["day_parting"] AND lifetime_budget_cents (not daily). Tip: use ads_set_adset_schedule for an ergonomic builder. pacing_type: ["standard"] (default) or ["day_parting"] when adset_schedule is set. attribution_spec: e.g. [{"event_type":"CLICK_THROUGH","window_days":7}]. frequency_control_specs: e.g. [{"event":"IMPRESSIONS","interval_days":7,"max_frequency":3}].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| status | No | PAUSED | |
| confirm | No | ||
| end_time | No | ||
| targeting | Yes | ||
| account_id | Yes | ||
| start_time | No | ||
| campaign_id | Yes | ||
| pacing_type | No | ||
| bid_strategy | No | ||
| billing_event | Yes | ||
| adset_schedule | No | ||
| promoted_object | No | ||
| attribution_spec | No | ||
| bid_amount_cents | No | ||
| destination_type | No | ||
| optimization_goal | Yes | ||
| daily_budget_cents | No | ||
| lifetime_budget_cents | No | ||
| frequency_control_specs | No |