create_x_ads_audience
Create an X custom audience
Description
Create an X custom audience (a customer list for retargeting or exclusion), optionally filled with people in the same call. Pass ordinary emails, phones (E.164), X handles, X user ids or device ids — they are normalised and SHA-256 hashed on Hermoso's server before X sees them; 64-hex hashes pass as is; anything unusable is named, never sent. X needs up to 48h and about 100 matched people before it can be targeted (add_x_ads_targeting with targetingType CUSTOM_AUDIENCE). Read back. Free.
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) |
namerequired | string | unique per account |
description | string | optional description of the audience |
emails | string[] | plain addresses or 64-hex SHA-256 hashes |
phones | string[] | E.164, e.g. +14155550100, or hashes |
handles | string[] | X handles, with or without @ |
twitterIds | string[] | X user ids to add; hashed on Hermoso's server before X receives them |
deviceIds | string[] | IDFA / AdID / Android id |
users | object[] | one person per entry with several identifiers: {email, phone, handle, twitterId, deviceId} |
expiresAt | string | ISO 8601; X defaults to 13 months |
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_audience.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_x_ads_audience","arguments":{"name":"<string>"}}}
CLI
hermoso call create_x_ads_audience --json '{"name":"<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.
Related tools
add_x_ads_targetingTarget an X ads line itemlist_x_ads_audiencesList X custom audiencesupdate_x_ads_audienceChange an X custom audiencemanage_x_ads_conversion_eventsX Pixel conversion events (list / create / update)send_x_ads_conversionsSend conversions to X (Conversion API)create_x_ads_promoted_tweetAttach a post to an X line item (paused)x_ads_geo_searchFind X ads location idsx_ads_reportX ads performance reportlist_openai_ads_conversion_eventsList ChatGPT Ads conversion eventscreate_openai_ads_pixelCreate a ChatGPT Ads pixel