# Create an X Ads line item

Create a line item (ad group) under a campaign. Works on your own X Ads account, connected through Get MCP Ads. The preview is free; the change costs $0.05 when you confirm it. Needs account id, campaign id, daily budget amount local micro and more.

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. Agentik price: free to preview; $0.05 when the change is applied (confirm: true without validateOnly).

- Tool ID: `x-ads/create-line-item`
- Name in the catalog: X Ads: Create line item
- Provider: [X Ads](/providers/x-ads.md)
- Capability: [X Ads campaign management](/tools/x-ads/campaign-management.md)
- Price: free preview, $0.05 per applied change
- Workspace access is automatic. Connect a platform using the link and notice returned to your AI assistant; an owner or admin completes platform consent and returns to the conversation; see the [guide](/docs/getmcpads.md).
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

The provider’s price, with no markup. Billed for measured usage.


```json
{
  "model": "per_call",
  "amountUsd": 0,
  "multipliers": [
    {
      "all": [
        {
          "field": "confirm",
          "equals": true
        },
        {
          "field": "validateOnly",
          "truthy": false
        }
      ],
      "setUsd": 0.05
    }
  ]
}
```

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "account_id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9]+$",
      "maxLength": 64,
      "description": "X Ads account ID selected in Sources."
    },
    "advertiser_domain": {
      "type": "string",
      "maxLength": 100000,
      "description": "Website domain of the advertiser (no protocol), e.g. x.com; required when placements includes PUB..."
    },
    "android_app_store_identifier": {
      "type": "string",
      "maxLength": 100000,
      "description": "Google Play package name of the promoted app, e.g. com.example.app; for APP_INSTALLS / APP_ENGAGE..."
    },
    "audience_expansion": {
      "type": "string",
      "enum": [
        "BROAD",
        "DEFINED",
        "EXPANDED"
      ],
      "description": "Audience expansion level. EXPANDED is what Ads Manager calls Optimized Targeting: serving may ext..."
    },
    "bid_amount_local_micro": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Bid in micros of the account currency; only with bid_strategy MAX or TARGET."
    },
    "bid_strategy": {
      "type": "string",
      "enum": [
        "AUTO",
        "MAX",
        "TARGET"
      ],
      "description": "Bidding strategy. AUTO (default) needs no bid amount; MAX/TARGET require bid_amount_local_micro.",
      "default": "AUTO"
    },
    "campaign_id": {
      "type": "string",
      "maxLength": 100000,
      "description": "Campaign to create the line item under."
    },
    "categories": {
      "type": "string",
      "maxLength": 100000,
      "description": "Comma-separated IAB content category IDs for the advertiser, e.g. IAB3-1,IAB19 (see list_iab_cate..."
    },
    "daily_budget_amount_local_micro": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Daily budget for this line item (ad group) in micros of the account currency (e.g. 50000000 = $50..."
    },
    "duration_in_days": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Window over which frequency_cap applies (1, 7 or 30 days); set together with frequency_cap."
    },
    "end_time": {
      "type": "string",
      "maxLength": 100000,
      "description": "Line item end time (ISO 8601). Omit for no end."
    },
    "frequency_cap": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Maximum times an ad can be delivered to a user within duration_in_days; only for REACH, ENGAGEMEN..."
    },
    "goal": {
      "type": "string",
      "maxLength": 100000,
      "description": "Optimization goal (e.g. ENGAGEMENT, LINK_CLICKS, SITE_VISITS, WEBSITE_CONVERSIONS, FOLLOWERS, APP..."
    },
    "ios_app_store_identifier": {
      "type": "string",
      "maxLength": 100000,
      "description": "Numeric Apple App Store ID of the promoted app, e.g. 333903271; for APP_INSTALLS / APP_ENGAGEMENT..."
    },
    "name": {
      "type": "string",
      "maxLength": 100000,
      "description": "Line item name (1-255 characters)."
    },
    "objective": {
      "type": "string",
      "enum": [
        "APP_ENGAGEMENTS",
        "APP_INSTALLS",
        "ENGAGEMENTS",
        "FOLLOWERS",
        "PREROLL_VIEWS",
        "REACH",
        "VIDEO_VIEWS",
        "WEBSITE_CLICKS"
      ],
      "description": "Campaign objective for this line item."
    },
    "pay_by": {
      "type": "string",
      "enum": [
        "APP_CLICK",
        "APP_INSTALL",
        "ENGAGEMENT",
        "FOLLOW",
        "IMPRESSION",
        "LINK_CLICK",
        "VIEW",
        "VIEW_3S_100PCT",
        "VIEW_6S",
        "VIDEO_START"
      ],
      "description": "Unit to pay by. Only settable for APP_INSTALLS (APP_CLICK or APP_INSTALL) and REACH (IMPRESSION) ..."
    },
    "placements": {
      "type": "string",
      "maxLength": 100000,
      "description": "Comma-separated placements, e.g. ALL_ON_TWITTER or TWITTER_TIMELINE,TWITTER_PROFILE. Valid values..."
    },
    "primary_web_event_tag": {
      "type": "string",
      "maxLength": 100000,
      "description": "Website conversion tag (pixel) id, required when goal=WEBSITE_CONVERSIONS; see list_web_event_tags."
    },
    "product_type": {
      "type": "string",
      "enum": [
        "PROMOTED_TWEETS",
        "PROMOTED_ACCOUNT",
        "MEDIA"
      ],
      "description": "Promoted product type. ads-api requires it on every new line item; sent as PROMOTED_TWEETS (post-..."
    },
    "standard_delivery": {
      "type": "boolean",
      "description": "true (default) paces spend evenly through the day; false spends as fast as possible (accelerated ..."
    },
    "start_time": {
      "type": "string",
      "maxLength": 100000,
      "description": "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": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Line item total budget in micros of the account currency."
    },
    "confirm": {
      "type": "boolean",
      "default": false,
      "description": "False previews only; true applies this exact change after explicit human confirmation."
    },
    "workspace_id": {
      "type": "string",
      "description": "Authorized workspace ID from list_accounts/list_workspaces. Use the user's chosen workspace; never guess between clients. Optional when a unique account identifies it."
    },
    "reason": {
      "type": "string",
      "maxLength": 500,
      "description": "Why, in the person's words or from the evidence (e.g. CPA twice the target for 7 days). Saved with the change in the shared client journal."
    }
  },
  "required": [
    "account_id",
    "campaign_id",
    "daily_budget_amount_local_micro",
    "objective",
    "placements",
    "start_time"
  ]
}
```

## Published example

No example input is published for this tool. Ask for the inputs required by its schema.

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

[REST inspection](https://api.agentik.cc/v1/tools/x-ads/create-line-item) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/x-ads/create-line-item) · [Agent index](/llms.txt)
