hermosodocs

delete_x_ads_object

Delete an X ads object (permanent, cascades) destructive

Area: X: managing what you built · Ad campaign management. Generated from the running MCP server, like the rest of the tool reference.

Description

PERMANENTLY delete an X campaign, line item, promoted post, promoted account or targeting criterion — or ARCHIVE a lead form (it stops collecting and its leads can no longer be exported, so run get_x_ads_leads first), or remove a card, a Media Library item (type media: id is the media_key) or a custom audience (custom_audience). X CASCADES AND PUBLISHES NO UNDO: deleting a campaign destroys its line items and their promoted posts too — verified live, the children answer 404 the moment the parent is deleted. RUN IT WITHOUT confirm FIRST: that deletes nothing and reports the REAL blast radius read back off X (what is underneath it, whether it is live, whether it has spent). Show the user exactly that, get an unambiguous yes, then call again with confirm:true — and, for anything with children / live delivery / real spend, also confirmName set to its exact name and confirmChildren set to the real count, because confirm:true alone proves you meant to delete SOMETHING and cannot prove you aimed at the right object. TO STOP DELIVERY WITHOUT DESTROYING ANYTHING use set_x_ads_status PAUSED, which is reversible — except for a promoted post, which cannot be paused on X at all, so pause its LINE ITEM instead. Removing a targeting criterion WIDENS the audience rather than narrowing it. The result is confirmed by re-reading the object, never by X's 200.

Parameters

ParameterTypeDescription
adAccountIdstringX ad account id (list_x_ads_accounts); omit if only one is shared
accountIdstringolder name for adAccountId (MCP only)
typerequired"campaign" | "line_item" | "promoted_tweet" | "targeting_criterion" | "promoted_account" | "lead_form" | "card" | "media" | "custom_audience"kind of object the id names; for media, id is the media_key
idrequiredstringcampaign/line-item id, or the id from list_x_ads_promoted_tweets / list_x_ads_targeting
lineItemIdstringREQUIRED for type "targeting_criterion" — X cannot look one up without its line item
confirmbooleanomit on the first call to see the blast radius
confirmNamestringthe target's exact name — required once it has children, is live, or has spent
confirmChildrennumberthe real number of children, from the unconfirmed call

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/delete_x_ads_object.

MCP (tools/call)

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"delete_x_ads_object","arguments":{"type":"<one of the listed values>","id":"<string>"}}}

CLI

hermoso call delete_x_ads_object --json '{"type":"<one of the listed values>","id":"<string>"}'

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