# x_ads_create_line_item

> Create a line item (ad group) under a campaign. A write tool that previews before it changes anything, one of 26 X Ads tools on the Get MCP Ads MCP gateway.

[Documentation](https://www.getmcpads.com/docs) / [Sources](https://www.getmcpads.com/docs/sources) / [X Ads](https://www.getmcpads.com/docs/sources/x-ads)

Create a line item (ad group) under a campaign. The line item is ALWAYS created with entity_status PAUSED ; it cannot serve or spend until explicitly activated with activate_line_item. For website conversion campaigns, set goal=WEBSITE_CONVERSIONS and primary_web_event_tag to a web event tag (pixel) id from list_web_event_tags. Preview by default. Ask the user to approve the exact account, target and parameters before confirm:true.

> **Warning** This tool changes the account. It is absent from the tool list on the Free plan, and it previews by default: without `confirm: true` it describes the change and applies nothing.

|  |  |
| --- | --- |
| Source | [X Ads](https://www.getmcpads.com/docs/sources/x-ads) |
| Kind | Write |
| Discovery | Reachable through `search_tools` and `run_tool` |
| Account parameter | `account_id` |
| Endpoint | https://mcp.getmcpads.com/x-ads/mcp |

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `account_id` | string | Required | X Ads account ID selected in Sources. |
| `advertiser_domain` | string | Optional | Website domain of the advertiser (no protocol), e.g. x.com; required when placements includes PUB... |
| `android_app_store_identifier` | string | Optional | Google Play package name of the promoted app, e.g. com.example.app; for APP_INSTALLS / APP_ENGAGE... |
| `audience_expansion` | string | Optional | Audience expansion level. EXPANDED is what Ads Manager calls Optimized Targeting: serving may ext... One of: `BROAD`, `DEFINED`, `EXPANDED`. |
| `bid_amount_local_micro` | integer | Optional | Bid in micros of the account currency; only with bid_strategy MAX or TARGET. |
| `bid_strategy` | string | Optional | Bidding strategy. AUTO (default) needs no bid amount; MAX/TARGET require bid_amount_local_micro. One of: `AUTO`, `MAX`, `TARGET`. |
| `campaign_id` | string | Required | Campaign to create the line item under. |
| `categories` | string | Optional | Comma-separated IAB content category IDs for the advertiser, e.g. IAB3-1,IAB19 (see list_iab_cate... |
| `daily_budget_amount_local_micro` | integer | Required | Daily budget for this line item (ad group) in micros of the account currency (e.g. 50000000 = $50... |
| `duration_in_days` | integer | Optional | Window over which frequency_cap applies (1, 7 or 30 days); set together with frequency_cap. |
| `end_time` | string | Optional | Line item end time (ISO 8601). Omit for no end. |
| `frequency_cap` | integer | Optional | Maximum times an ad can be delivered to a user within duration_in_days; only for REACH, ENGAGEMEN... |
| `goal` | string | Optional | Optimization goal (e.g. ENGAGEMENT, LINK_CLICKS, SITE_VISITS, WEBSITE_CONVERSIONS, FOLLOWERS, APP... |
| `ios_app_store_identifier` | string | Optional | Numeric Apple App Store ID of the promoted app, e.g. 333903271; for APP_INSTALLS / APP_ENGAGEMENT... |
| `name` | string | Optional | Line item name (1-255 characters). |
| `objective` | string | Required | Campaign objective for this line item. One of: `APP_ENGAGEMENTS`, `APP_INSTALLS`, `ENGAGEMENTS`, `FOLLOWERS`, `PREROLL_VIEWS`, `REACH`, `VIDEO_VIEWS`, `WEBSITE_CLICKS`. |
| `pay_by` | string | Optional | Unit to pay by. Only settable for APP_INSTALLS (APP_CLICK or APP_INSTALL) and REACH (IMPRESSION) ... One of: `APP_CLICK`, `APP_INSTALL`, `ENGAGEMENT`, `FOLLOW`, `IMPRESSION`, `LINK_CLICK`, `VIEW`, `VIEW_3S_100PCT`, `VIEW_6S`, `VIDEO_START`. |
| `placements` | string | Required | Comma-separated placements, e.g. ALL_ON_TWITTER or TWITTER_TIMELINE,TWITTER_PROFILE. Valid values... |
| `primary_web_event_tag` | string | Optional | Website conversion tag (pixel) id, required when goal=WEBSITE_CONVERSIONS; see list_web_event_tags. |
| `product_type` | string | Optional | Promoted product type. ads-api requires it on every new line item; sent as PROMOTED_TWEETS (post-... One of: `PROMOTED_TWEETS`, `PROMOTED_ACCOUNT`, `MEDIA`. |
| `standard_delivery` | boolean | Optional | true (default) paces spend evenly through the day; false spends as fast as possible (accelerated ... |
| `start_time` | string | Required | Line item start time (ISO 8601, e.g. 2026-08-01T00:00:00Z). ads-api requires it on every new line... |
| `total_budget_amount_local_micro` | integer | Optional | Line item total budget in micros of the account currency. |
| `confirm` | boolean | Optional | False previews only; true applies this exact change after explicit human confirmation. Default: `false`. |

## Calling it

Through run_tool, since it is not announced

```json
{
  "name": "run_tool",
  "arguments": {
    "name": "x_ads_create_line_item",
    "args": {
      "account_id": "<string>",
      "campaign_id": "<string>",
      "daily_budget_amount_local_micro": "<integer>",
      "objective": "APP_ENGAGEMENTS",
      "placements": "<string>",
      "start_time": "<string>"
    }
  }
}
```

- [X Ads metrics](https://www.getmcpads.com/docs/sources/x-ads/metrics): What you can ask for.
- [X Ads dimensions](https://www.getmcpads.com/docs/sources/x-ads/dimensions): How you can break it down.

---

This page as HTML: https://www.getmcpads.com/docs/sources/x-ads/tools/x_ads_create_line_item
Every page under /docs is available as Markdown: append `.md`, or send `Accept: text/markdown`.
