Create a TikTok campaign (Smart+)
tiktok_create_campaignCreate a complete TikTok campaign on the upgraded Smart+ API: campaign + ad group, and an ad when video_ids are given. Everything is created PAUSED. Goals: sales (website conversions with a Pixel event) or leads (instant form, a website form tracked by the Pixel, or a chat on WhatsApp, Messenger or TikTok direct messages). Targeting can be automatic (TikTok finds the audience) or manual (countries/locations, ages, gender, languages, custom audiences). Budget is daily or lifetime, at campaign level (TikTok distributes it) or ad group level. Always offer dry_run=true first and show the plan; turning it on later needs the user's confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ages | No | ||
| goal | Yes | ||
| name | Yes | ||
| event | No | Pixel event to optimise for. Default purchase (sales) / submit_form (website leads). | |
| budget | Yes | In the account currency. | |
| folder | No | Client folder name. | |
| gender | No | ||
| account | No | TikTok advertiser account name or ID. Optional when only one is enabled. | |
| dry_run | No | ||
| form_id | No | Instant form page_id for lead_destination=instant_form. | |
| ad_texts | No | ||
| end_time | No | Optional 'YYYY-MM-DD HH:MM' in UTC; required for lifetime budgets. | |
| language | No | Language of the card: the language the user is writing in (ar for any Arabic dialect). | |
| pixel_id | No | Pixel ID (numeric, from tiktok_tracking_audit). Required for sales and website leads. | |
| countries | No | Country codes, e.g. ["SA","AE"]. | |
| languages | No | Language codes, e.g. ["ar","en"]. | |
| targeting | No | Default automatic (TikTok's audience targeting, location still applies). | |
| video_ids | No | From tiktok_upload_video. TikTok rotates them automatically. | |
| placements | No | Default automatic. | |
| start_time | No | Optional 'YYYY-MM-DD HH:MM' in UTC. Default now. | |
| budget_type | No | Default daily. | |
| identity_id | No | From tiktok_identities; needed to create the ad. | |
| audience_ids | No | ||
| bid_cost_cap | No | Optional target cost per result (cost cap). Omit for maximum delivery. | |
| budget_level | No | campaign = TikTok distributes it (default). | |
| location_ids | No | Extra location IDs from tiktok_search_locations. | |
| identity_type | No | ||
| call_to_action | No | ||
| whatsapp_number | No | For whatsapp: the WhatsApp Business API number in international format, e.g. +9665XXXXXXXX. | |
| facebook_page_id | No | For messenger: the Facebook Page ID that receives the messages. | |
| landing_page_url | No | ||
| lead_destination | No | For goal=leads. instant_form needs form_id (see tiktok_lead_forms); website needs pixel_id and an event like submit_form; whatsapp needs whatsapp_number (a WhatsApp Business API number); messenger needs facebook_page_id; tiktok_dm sends people to the TikTok account's direct messages (needs a TikTok account identity). | |
| message_event_set_id | No | Optional messaging event set (from a TikTok Messaging Partner). With it the ad group optimises for conversations; without it, for clicks to chat. | |
| excluded_audience_ids | No |