Shoplift API with Claude
Use the Shoplift API with Claude
The Shoplift API is designed to work with AI assistants. Give Claude two things, your API key and the Shoplift API reference, and you can run your entire testing program in plain English: create tests, launch them, pause them, and pull results without writing a line of code yourself.
This guide uses Claude Code, Anthropic's agentic coding tool, because it can make API requests and read local files on your behalf. The same approach works in any AI tool that can execute HTTP requests.
Setup
Get your API key. Follow Get and manage your API key. Put the key somewhere Claude can read it, for example an
.envfile in your working directory.Give Claude the API reference. Point Claude at the hosted API reference at
docs.shoplift.ai/api-reference/public-api-1/shoplift-api. Shoplift's documentation is agent-readable: any page is available as plain Markdown by appending.mdto its URL, so Claude can pull exactly the endpoint documentation it needs. You can also download the reference from the API docs link on the Settings > API page and save it in your working directory if you prefer to work offline.
That's the whole setup. Claude reads the reference, learns the endpoints, and handles authentication, request formatting, and error handling on its own.
Workflow 1: Create and manage tests with Claude
With the key and reference in place, describe what you want in plain language.
Create a test:
You have access to a directory with a .env file containing my Shoplift API key,
and the Shoplift API reference PDF. Set up a URL redirect test comparing
/pages/original against /pages/new-landing, optimizing for conversion rate.
Let me know if you need anything from my side.Claude reads the reference, builds the request, and creates the test in draft state. New tests are never live until you launch them, so there's a natural checkpoint to review the draft in your dashboard before anything reaches visitors.
Launch, pause, or end it:
Claude doesn't mind typos or shorthand, and it will confirm state changes against the API's responses. A successful launch or pause returns immediately, and refreshing your Shoplift dashboard shows the updated status.
Organize as you go:
Pull and interpret results:
This is where an assistant earns its keep. Instead of a raw JSON payload, you get an interpretation: the traffic split, the observed lift, which metrics moved, the Bayesian win probability, and how far through its sample size the test got. If a test was ended early, Claude can tell you whether the trend was promising and how conclusive the data actually was.
Workflow 2: Add Shopify CLI for theme tests
Theme tests require Shopify theme IDs, which the Shoplift API doesn't provide. If you have the Shopify CLI installed and authenticated, Claude can pull your theme IDs itself and use them directly.
Claude lists your themes through the CLI, identifies the live theme and the variant by name, and creates the theme test with the correct IDs. Because it can see both themes, it can also catch and fix comparability issues before launch. In Shoplift's own testing, Claude noticed the variant theme was missing a template that existed on the live theme, copied it over, and confirmed both themes were aligned before creating the test, all without being asked.
This combination of the Shoplift API and the Shopify CLI lets you manage your store's testing program end to end from a single Claude session: inspect themes, fix template gaps, create the test, launch it, and pull the results.
Example prompts
A starting set, from simplest to most involved:
Tips
Reference tests by name. Claude can look up a test's ID from its title through the list endpoint, so you don't need to copy UUIDs around. If you do paste an ID and it returns a 404, ask Claude to find the test by name instead. The ID you copied may belong to a different test.
Drafts are your safety net. Tests are created in draft state and only go live when launched. If Claude sets up something you didn't intend, delete the draft and try again.
Mind the rate limit. The API allows 60 requests per minute. For bulk operations across many tests, Claude will paginate and pace requests, but very large batch jobs may take a few minutes.
Still need help?
Contact the Shoplift support team if you have questions about using the Shoplift API with Claude.
Last updated
Was this helpful?