# Hermoso: create_x_ads_line_item · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/ads/create_x_ads_line_item/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Ad campaign management](https://hermoso.ai/docs/reference/ads/) / create_x_ads_line_item

# `create_x_ads_line_item`

Build an X ads line item (paused) destructive

Area: X: the rest of the tree · [Ad campaign management](https://hermoso.ai/docs/reference/ads/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## Description

Create a line item — X's ad group — under a campaign. ALWAYS CREATED PAUSED with no override. THE TREE ON X IS campaign -> line item -> promoted post, and a campaign ALONE CANNOT SERVE: this is the middle level, and it still cannot serve until you attach a post with create_x_ads_promoted_tweet. Targeting attaches HERE (add_x_ads_targeting), never to the campaign. `objective` is validated before dispatch because X answers an invalid one with a 500 that reads like an outage; note that WEBSITE_CONVERSIONS and SITE_VISITS are `goal` values and are NOT objectives. `bidStrategy` MAX/TARGET require a bidAmount; AUTO lets X set it. Omitting startTime records now, and the read-back says so. Everything is READ BACK from X before you are told it exists; print the returned note verbatim.

## Parameters

Parameter Type Description

`adAccountId` `string` X ad account id (list_x_ads_accounts); omit if only one is shared

`accountId` `string` older name for adAccountId (MCP only)

`campaignId` required `string` from create_x_ads_campaign or list_x_ads_campaigns

`name` `string` line item (ad group) name

`objective` required `"APP_ENGAGEMENTS" | "APP_INSTALLS" | "ENGAGEMENTS" | "FOLLOWERS" | "PREROLL_VIEWS" | "REACH" | "VIDEO_VIEWS" | "WEBSITE_CLICKS"` one per campaign (X refuses a second objective). For an X LEAD AD use WEBSITE_CLICKS with a lead-form card — X retired LEAD_GENERATION

`productType` `"MEDIA" | "PROMOTED_ACCOUNT" | "PROMOTED_TWEETS"` default PROMOTED_TWEETS — PROMOTED_ACCOUNT when objective is FOLLOWERS, and that line item serves the ACCOUNT attached with create_x_ads_promoted_account

`placements` `"ALL_ON_TWITTER" | "PUBLISHER_NETWORK" | "TAP_BANNER" | "TAP_FULL" | "TAP_FULL_LANDSCAPE" | "TAP_MRECT" | "TAP_NATIVE" | "TWITTER_MEDIA_VIEWER" | "TWITTER_PROFILE" | "TWITTER_REPLIES" | "TWITTER_SEARCH" | "TWITTER_TIMELINE"[]` default ALL_ON_TWITTER

`goal` `"APP_CLICKS" | "APP_INSTALLS" | "APP_PURCHASES" | "ENGAGEMENT" | "FOLLOWERS" | "LINK_CLICKS" | "MAX_REACH" | "PREROLL" | "PREROLL_STARTS" | "REACH_WITH_ENGAGEMENT" | "SITE_VISITS" | "SOCIAL_ENGAGEMENT" | "VIDEO_VIEW" | "VIEW_15S" | "VIEW_3S_100PCT" | "VIEW_6S" | "WEBSITE_CONVERSIONS" | "WEBSITE_CONVERSIONS_V2"` optimization goal, e.g. LINK_CLICKS or WEBSITE_CONVERSIONS; these are goals, not objectives

`standardDelivery` `boolean` false = accelerated, only with line item budgets; X refuses it under a campaign budget

`bidStrategy` `"AUTO" | "GUARANTEED" | "MAX" | "TARGET"` AUTO lets X set the bid; MAX and TARGET need bidAmount

`bidAmount` `number` required for MAX/TARGET; in the ad account's currency

`totalBudget` `number` lifetime budget for this line item in ad account currency

`startTime` `string` ISO 8601; defaults to now

`endTime` `string` ISO 8601 end time for this line item

## Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and `POST https://app.hermoso.ai/v1/tools/create_x_ads_line_item`.

**MCP** (`tools/call`)

`{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_x_ads_line_item","arguments":{"campaignId":"<string>","objective":"<one of the listed values>"}}}`
**CLI**

`hermoso call create_x_ads_line_item --json '{"campaignId":"<string>","objective":"<one of the listed values>"}'`

## Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See [Credits & costs](https://hermoso.ai/docs/credits/).

## Related tools

- [create_x_ads_promoted_tweet](https://hermoso.ai/docs/reference/ads/create_x_ads_promoted_tweet/) Attach a post to an X line item (paused)
- [add_x_ads_targeting](https://hermoso.ai/docs/reference/ads/add_x_ads_targeting/) Target an X ads line item
- [list_x_ads_line_items](https://hermoso.ai/docs/reference/ads/list_x_ads_line_items/) List X ads line items
- [create_x_ads_promoted_account](https://hermoso.ai/docs/reference/ads/create_x_ads_promoted_account/) Attach an X account to a follower line item (paused)
- [list_x_ads_promotable_users](https://hermoso.ai/docs/reference/ads/list_x_ads_promotable_users/) List the X accounts an ad account may promote

[All 759 Ad campaign management tools](https://hermoso.ai/docs/reference/ads/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
