Integrations

API keys for custom integrations

Create an API key with Read or Write scope, use it with the RecurX public API or an AI assistant over MCP, and revoke it when you no longer need it.

4 min read702 words

An API key lets your own scripts, tools and AI assistants read and change your RecurX subscriptions. You create keys on the API keys page, choose what each one may do, and revoke them at any time. Creating a key takes about a minute. API keys are available on every plan.

Step 1: Open API keys

  1. In your Shopify admin, open Apps → RecurX Subscriptions.
  2. Click App settings in the sidebar.
  3. Under Connections and automation, click API keys.
The Settings page with the API keys row highlighted
The Settings page with the API keys row highlighted

Step 2: Create a key

  1. Click Create API key in the top right.
The API keys page with the Create API key button highlighted
The API keys page with the Create API key button highlighted
  1. In Create new API key, enter a Key name that says where the key is used, for example Zapier production.
  2. Under Scopes, tick what the key may do:
    • Read: look up subscriptions, customers and plans
    • Write: pause, resume, skip, reschedule and cancel subscriptions
  3. Click Generate key.
The Create new API key modal with Key name, Scopes and the Generate key button numbered
The Create new API key modal with Key name, Scopes and the Generate key button numbered

Tip: Give each tool its own key with only the scope it needs. A reporting tool needs Read only. You can then revoke one tool's access without touching the others.

Step 3: Copy the key

A yellow banner shows the new key with a Copy button: Copy your API key now — it won't be shown again! Click Copy and store it in your password manager or the tool that uses it.

Important: RecurX keeps only a secure hash of the key, so it can't show it again. If you lose it, revoke it and create a new one.

The key now appears under Your API keys with its name, the first characters of the key, its scopes and the date it was created and last used.

The Your API keys list with a Revoke button highlighted
The Your API keys list with a Revoke button highlighted

Note: Keys created before the Read/Write choice existed show finer scopes such as read:contracts or write:contracts. They keep working.

Step 4: Call the API

Send the key in the X-RecurX-Api-Key header with every request:

X-RecurX-Api-Key: <your API key>
The API documentation card with the X-RecurX-Api-Key header example highlighted
The API documentation card with the X-RecurX-Api-Key header example highlighted

The API documentation card lists every endpoint, its method and the scope it needs. All paths start with /api/public/v1/ on the same host as the MCP endpoint shown on the page. Click View OpenAPI docs for the full reference.

The API documentation card with the View OpenAPI docs link highlighted
The API documentation card with the View OpenAPI docs link highlighted

What the API covers:

Area Read Write
Subscription contracts List, fetch one Cancel, pause, resume, skip next, reschedule, swap product, change frequency, apply discount
Customers List customers with active contracts —
Plans List, fetch one —
Analytics Headline summary (MRR, active, churn, recovered) —
Webhooks List your endpoints Register an HTTPS endpoint, delete one

Requests are rate-limited, and every call is recorded in RecurX's audit log.

Connect an AI assistant (MCP)

RecurX runs a remote MCP server, so Claude, ChatGPT, Codex and other AI agents can manage subscriptions with your permission: list and search contracts, pause, resume, skip, reschedule, swap products, apply save discounts and read analytics.

  1. Create a key in Step 2. Use Read only for assistants that just report.
  2. In Connect your AI assistant, copy the MCP endpoint.
  3. Follow the instructions on the card for Claude Code, Claude (claude.ai / Desktop) or OpenAI (API / Codex). Assistants send the key as Authorization: Bearer <your API key>.
The Connect your AI assistant card with the MCP endpoint highlighted
The Connect your AI assistant card with the MCP endpoint highlighted

Note: AI agents can never cancel a subscription over MCP. When asked to cancel, they present your retention offers instead.

Revoke a key

  1. Under Your API keys, click Revoke next to the key.
  2. Confirm with Revoke.
The Revoke confirmation modal with the Revoke button highlighted
The Revoke confirmation modal with the Revoke button highlighted

Apps and scripts using the key lose access immediately. This can't be undone — the key stays in the list marked Revoked. There is no rotate button: to rotate a key, create a new one, switch your tool over, then revoke the old one.

Troubleshooting

  • "Enter a key name." / "Select at least one scope." — fill in both before clicking Generate key.
  • The API answers 401 — the key is missing, mistyped or revoked. Check the header name and create a new key if needed.
  • The API answers 403 — the key doesn't have the scope for that endpoint, for example a Read key calling pause. Create a key with Write.

Related articles

Need help?

Ask in chat — our assistant answers straight away from these guides, and a person from the team takes over whenever you ask. Or email [email protected].

Email support