hermosodocs

create_x_ads_line_item

Build an X ads line item (paused) destructive

Area: X: the rest of the tree · Ad campaign management. Generated from the running MCP server, like the rest of the tool 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

ParameterTypeDescription
adAccountIdstringX ad account id (list_x_ads_accounts); omit if only one is shared
accountIdstringolder name for adAccountId (MCP only)
campaignIdrequiredstringfrom create_x_ads_campaign or list_x_ads_campaigns
namestringline item (ad group) name
objectiverequired"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
standardDeliverybooleanfalse = 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
bidAmountnumberrequired for MAX/TARGET; in the ad account's currency
totalBudgetnumberlifetime budget for this line item in ad account currency
startTimestringISO 8601; defaults to now
endTimestringISO 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.

All 759 Ad campaign management tools · tools.json