Skip to main content
POST
Have the AI Campaign Builder assemble a complete Meta campaign (audiences, ad sets, ads, copy, creatives) as a reviewable draft. FREE and publishes nothing. Returns a jobId; poll get_campaign_build until phase is preview_ready, show the preview to the user, then call launch_campaign. Use get_launch_options first for pixel/Page ids.

Authorizations

Authorization
string
header
required

AdStellar API key (ast_live_...)

Body

application/json
adAccountId
string
required

Meta ad account id from list_ad_accounts.

Minimum string length: 1
objective
enum<string>
required

Campaign objective.

Available options:
OUTCOME_SALES,
OUTCOME_LEADS,
OUTCOME_TRAFFIC,
OUTCOME_AWARENESS,
OUTCOME_ENGAGEMENT,
OUTCOME_APP_PROMOTION
dailyBudget
number
required

Daily budget in the ad account's currency (major units).

Required range: 1 <= x <= 100000
destinationUrl
string<uri>

Landing page of the product being advertised, from the user or list_products; never an app or Page URL from get_launch_options. Required for website / instant_form campaigns; recommended for all because the copywriter writes every ad from this page.

destination
enum<string>

Where ads send people. Defaults to the objective's default (website, or app for App Promotion).

Available options:
website,
instant_form,
app,
whatsapp,
messenger,
instagram_direct,
messenger_instagram
conversionLocation
enum<string>

Leads only: WEBSITE (pixel + landing page) or INSTANT_FORMS (no pixel). Default WEBSITE.

Available options:
WEBSITE,
INSTANT_FORMS
conversionEvent
string

Pixel event to optimise for on Sales/Leads, e.g. "Purchase", "Lead", "StartTrial". Default follows the objective.

Maximum string length: 60
pixelId
string

Pixel id or exact name from get_launch_options. Auto-selected when the account has exactly one.

pageId
string

Facebook Page id or exact name from get_launch_options. Auto-selected when the account has exactly one.

appId
string

App Promotion only: app id from get_launch_options.

welcomeMessage
string

Messaging destinations only: greeting shown when the conversation opens.

Maximum string length: 500
campaignName
string

Campaign name. Omit to let the builder name it.

Maximum string length: 200
creativeAssetIds
string<uuid>[]

Up to 10 media asset ids (from search_assets or get_generation_status) to use as the ad creatives. Omit to let the builder pick from the library.

Maximum array length: 10
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
approvedCopy
object[]

Up to 5 ad copy variants the user already approved (e.g. from generate_ad_copy). Used verbatim.

Maximum array length: 5
geos
string[]

Countries to target (names or ISO codes). Omit for the builder default.

Maximum array length: 25
Maximum string length: 60
languages
string[]

Audience languages, e.g. ["English"]. Omit for all languages.

Maximum array length: 10
Maximum string length: 60
instructions
string

Free-text guidance for the builder: audience angle, offer, tone, exclusions.

Maximum string length: 2000
workspaceId
string<uuid>

Workspace to act in (must be granted to this credential). Omit for the primary workspace.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

Tool result