variants[].url buy links, and optional placement commission data when you opt in.
1. Create a key
- Go to the dashboard.
- Create an API key.
- Keep it out of git:
2. Send it on every MCP request
Channel3 acceptsx-api-key or Authorization: Bearer <key> on each POST to /mcp.
The UCP CLI has no separate
--api-key flag. Use --header per call or
headers.json on the profile (Shopify ucp-cli
docs).
Values support ${ENV_VAR} interpolation so secrets stay out of the file.3. Request placement commission data (optional)
With a Token-tier key, addcatalog.placements: ["affiliate"] to receive
variants[].placement commission data. See Extension
reference.
4. Check that it worked
Response headers:structuredContent (curl) or result (CLI), your buy links should be monetized to your account. Compare with the same search without a key (no monetization).
Bad or missing keys fall back to anonymous limits (no 401):
What’s next
Rate limits
Anonymous vs Token
Search
Run a search with your key