API & AI Copilot Quickstart

The Merch Jar API lets you read your advertising data, write and preview segments, and deploy automations programmatically. Paired with Claude, you can describe what you want in plain English and have it generate, test, and deploy segment logic directly against your live accounts.

What You Can Do

  • Ask questions about your advertising data across any account or marketplace
  • Write a segment in plain English and have AI generate the V2 logic
  • Preview exactly which keywords, campaigns, or search terms a segment would affect before it runs
  • Deploy and manage segments across multiple profiles without touching the UI
  • Duplicate segment logic across client accounts instantly

What You Need

  • A Merch Jar account (free trial available)
  • The Claude desktop app
  • The Claude for Chrome extension
  • The Merch Jar Copilot Pack (download below)

Step 1 — Download Claude

Download and install the Claude desktop app from claude.ai/download. This gives you access to Claude’s Cowork feature, which lets Claude read and write files on your computer — including your Copilot Pack config.

Step 2 — Install the Claude for Chrome Extension

Install the Claude for Chrome extension from the Chrome Web Store. This is required for Claude to connect to your Merch Jar account and make API calls on your behalf.

Step 3 — Download the Copilot Pack

The Copilot Pack is a folder of reference files that gives Claude everything it needs to work with your Merch Jar account. Download the pack, unzip it, and keep it somewhere you can find it.

[DOWNLOAD COPILOT PACK]

If you already have the pack and only need to update a specific file, download individual files below.

CLAUDE.md — Instructions that tell Claude how to behave as your Merch Jar copilot
Download v1.0 • April 2026

MJ_COPILOT_CONFIG.md — Your account config — Claude populates this automatically when you paste your API key
Download v1.0 • April 2026

MJ_API_REFERENCE.md — Full API endpoint documentation and request/response formats
Download v1.0 • April 2026

V2_SYNTAX_REFERENCE.md — Complete V2 Logic DSL reference for writing segment logic
Download v1.0 • April 2026

SEGMENT_CREATION_GUIDELINES.md — Best practices, patterns, and standards for writing segments
Download v1.0 • April 2026

templates/ — All Core Templates as ready-to-use segment files
Download v1.0 • April 2026

Step 4 — Set Up Cowork

Open the Claude desktop app and start a new conversation. Click the Cowork icon and point it at the folder where you unzipped the Copilot Pack. Claude will now have access to all the reference files in that folder.

Step 5 — Get Your API Key

In Merch Jar, go to Account Menu > API Keys and create a new key. Give it a name like “AI Copilot” or “Claude Integration”, then enable all scopes.

The full API key is only shown once at creation. Copy it somewhere safe before closing the page.

Step 6 — Initialize with Your API Key

Paste your API key into the chat and hit enter. Claude will automatically:

  • Save the key to your config file
  • Fetch all your connected ad accounts and marketplaces
  • Populate your config with the account list
  • Confirm setup and show you what you can do next

After that, every new session starts by reading your config — no need to paste your key again.

Step 7 — Start Working

Once initialized, you can talk to Claude naturally. Some things to try:

"Show me my segments for my US account"

"Write a segment that pauses keywords with more than 30 clicks and no orders in the last 14 days"

"Preview that segment against my live data before deploying it"

"Duplicate my bid management segment to all my client accounts"

"What's my total spend across all accounts in the last 30 days?"

Reference Docs

For more detail on how segments work and how to write them:

PREVIOUS ARTICLE
NEXT ARTICLE