Create an X Ads campaign
x_ads_create_campaignCreate an X Ads campaign in one call: the campaign with a daily budget (and optional total budget), one ad group (line item) with an objective, automatic bidding by default, optional location targeting (targeting values from x_ads_search_locations) and optional existing posts (post IDs) to promote. Everything is created PAUSED and spends nothing; turning it on is a separate step that needs the user's confirmation. Uses the account's active funding source. Use dry_run=true to validate without creating anything.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"daily_budget": "<daily_budget>"
},
"name": "x_ads_create_campaign"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bid | No | ||
| name | Yes | ||
| folder | No | Client folder name. | |
| account | No | X Ads account name or ID. Optional when only one is enabled. | |
| dry_run | No | ||
| end_date | No | Optional YYYY-MM-DD. | |
| language | No | Language of the card: the language the user is writing in. | |
| post_ids | No | IDs of existing posts to promote (the number at the end of the post URL). | |
| locations | No | Location targeting values from x_ads_search_locations. | |
| objective | No | Default WEBSITE_CLICKS. | |
| start_date | No | YYYY-MM-DD; default now. | |
| bid_strategy | No | Default AUTO. | |
| daily_budget | Yes | ||
| total_budget | No | ||
| ad_group_name | No | Default: campaign name. |