# Hermoso: delete_x_ads_object · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/ads/delete_x_ads_object/. 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/) / delete_x_ads_object

# `delete_x_ads_object`

Delete an X ads object (permanent, cascades) destructive

Area: X: managing what you built · [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

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

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)

`type` required `"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

`id` required `string` campaign/line-item id, or the id from list_x_ads_promoted_tweets / list_x_ads_targeting

`lineItemId` `string` REQUIRED for type "targeting_criterion" — X cannot look one up without its line item

`confirm` `boolean` omit on the first call to see the blast radius

`confirmName` `string` the target's exact name — required once it has children, is live, or has spent

`confirmChildren` `number` the 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](https://hermoso.ai/docs/credits/).

## Related tools

- [get_x_ads_leads](https://hermoso.ai/docs/reference/ads/get_x_ads_leads/) Read the leads from an X lead form
- [set_x_ads_status](https://hermoso.ai/docs/reference/ads/set_x_ads_status/) Pause or activate an X campaign or line item
- [x_ads_targeting_search](https://hermoso.ai/docs/reference/ads/x_ads_targeting_search/) Find X targeting ids (interests, devices, languages…)
- [list_x_ads_funding_instruments](https://hermoso.ai/docs/reference/ads/list_x_ads_funding_instruments/) List X ad account payment methods
- [list_x_ads_targeting](https://hermoso.ai/docs/reference/ads/list_x_ads_targeting/) List an X line item’s targeting
- [list_x_ads_promoted_tweets](https://hermoso.ai/docs/reference/ads/list_x_ads_promoted_tweets/) List X promoted posts
- [update_x_ads_line_item](https://hermoso.ai/docs/reference/ads/update_x_ads_line_item/) Change an X line item (ad group)
- [update_x_ads_campaign](https://hermoso.ai/docs/reference/ads/update_x_ads_campaign/) Change an X campaign budget or settings

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