ads_update_query_based_audience_by_audience_execution_id
Fix a FAILED AMC audience and run it again — Amazon accepts an update on a FAILED audience only; a working one cannot be changed (create a new one).
destructiveAmazon Adsads.amc-audiences
Pass only what changes: the name, type and description stay as they are. Amazon Ads API · updateQueryBasedAudienceByAudienceExecutionId · PUT /amc/audiences/query/{audienceExecutionId} Amazon Ads API · getQueryBasedAudienceByAudienceExecutionId · GET /amc/audiences/query/{audienceExecutionId} Docs: https://advertising.amazon.com/API/docs/en-us/amc-rba#tag/Rule-based-audience/operation/updateQueryBasedAudienceByAudienceExecutionId Docs: https://advertising.amazon.com/API/docs/en-us/amc-rba#tag/Rule-based-audience/operation/getQueryBasedAudienceByAudienceExecutionId Gate: approve — interactive: show the change (Amazon's preview first where one exists), wait for an explicit approve; autopilot: only when the seller's own words asked for this change; otherwise ask.
Call it
In an AI client (MCP)
{
"name": "ads_update_query_based_audience_by_audience_execution_id",
"arguments": {
"store": "myStore-US",
"country_code": "<country_code>",
"audience_execution_id": "<audience_execution_id>"
}
}From code (Tool API)
curl -X POST https://api.sellersheetai.com/api/v1/tools/ads_update_query_based_audience_by_audience_execution_id \
-H "Authorization: Bearer $SELLERSHEET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"store":"myStore-US","country_code":"<country_code>","audience_execution_id":"<audience_execution_id>"}'Arguments
| Name | Type | Description |
|---|---|---|
storerequired | string | the store ref `<store>-<CC>` (name-country, e.g. 'myStore-US') — one of get_user_context's store_refs, verbatim. |
country_coderequired | string | the Ads profile's 2-letter country code (e.g. 'US'). |
audience_execution_idrequired | string | the FAILED audience's data.audience_execution_id. |
sql_query | string | the corrected AMC SQL (still over *_for_audiences tables, SELECT user_id). |
time_window_start | string · date-time | UTC 'YYYY-MM-DDTHH:MM:SSZ'. |
time_window_end | string · date-time | UTC 'YYYY-MM-DDTHH:MM:SSZ'. |
time_window_relative | boolean | true to move the window forward at each refresh. |
parameter_values | object | values for parameters the SQL declares. |
lookalike_audience_expected_reach | string | a lookalike's reach. Allowed: MOST_SIMILAR | SIMILAR | BALANCED | BROAD | MOST_BROAD. |
Result
Every tool answers {notification, data, human_action}; data carries:
- the orchestrated result described below.
data.audience— the audience as updated, status PENDING again.
Gotchas
- Refused before any change when the audience is not FAILED.