Global Finalist2026 Amazon Ads Partner Awards

Developer API · Prompt library · 10 of 10

AMC audience from a template

Pick an Amazon Marketing Cloud audience template, size it, and create it, with a dry run first.

Key scope
WRead-and-write key
Build time
30 minutes
Stack
Node script, run on demand

For: Brands on AMC who want audiences without writing SQL.

Paste this into Claude, ChatGPT or Cursor

Read https://www.sellermate.ai/api-docs first. It documents the SellerMate Public API: REST over HTTPS, X-API-Key auth, and every tool with its parameters is on that page. Every tool is POST https://api.sellermate.ai/public/v1/tools/{name} with a JSON body.

Build me a command-line tool for creating Amazon Marketing Cloud audiences in one account.

- List available templates with get_amc_audience_templates and let me choose one and fill its inputs interactively
- Estimate the audience size with estimate_amc_audience_size and show it to me
- Run create_amc_audience with dry_run true first and print the resolved plan and SQL
- Only after I type "yes", create the audience for real, with the lookback days and refresh rate I chose
- Afterwards, list my audiences with list_amc_audiences to confirm it appears

Resolve the account with get_user_context.

Rules:
- My key is in the SELLERMATE_API_KEY environment variable. Send it as the X-API-Key header. Never hard-code it or log it.
- Call get_user_context first and use the accounts it returns. Don't invent account ids.
- Report tools are paginated (page, page_size up to 500, pagination.hasMore). Walk every page.
- On a 429, wait for the Retry-After header and retry. On a 401 or 403, stop and tell me.
- Show me the plan and the code before running anything that writes.

Stack: Node 20, TypeScript, no framework. Prompt with readline.

Fill in anything in [brackets] before you paste, or leave it and the assistant will ask. The first line sends it to the docs, where every tool is listed.

What you get

  • Template-driven audience creation with no SQL
  • A size estimate and a dry run before anything is created
  • A confirmation step and a listing afterwards

Before you paste

  • Read-and-write key. AMC needs an AMC instance on the account, which is Unlimited and above.
  • Amazon builds audiences asynchronously; the listing may take a while to show the new one.

Make it yours

Once it works, ask the assistant for one of these.

  • Schedule a monthly refresh that re-estimates each audience with get_amc_audience_size_estimate.
  • Feed a lookalike with lookalike_expected_reach for DSP prospecting.
Book Demo