Skip to main content

Subi API Guide: Manage Contracts and Subscriptions

Read your subscribers and contracts, and cancel, pause, resume, skip or reschedule a subscription from your own systems with the Subi API.

To make your first key as you read, open the API page in Subi.

Would you rather have it prepared for you? Tell us what you want to connect and we prepare it for your store on any paid Subi plan: a Zap, a Make scenario, a Google Sheet or the first lines of code for your developer.

Overview

The Subi API allows developers and technical teams to manage contracts and subscriptions programmatically. This is ideal for integrating Subi with internal systems, external tools, data warehouses, or custom applications.

With the API, you can automate subscription workflows and keep contract data in sync across platforms.
​

What your store needs

The Subi API is included in every current paid Subi plan and in almost every older one, the older Free and Essential plans included, so most stores do not need an add-on to use it. The Free plan offered to new stores today does not include it.

To check, open Settings > API keys in Subi. If your plan includes the API, you can generate a key right away. If it does not, the page shows a lock and an Upgrade your plan button, which lists the plans that include the API. If your store is on an older plan and the page still shows a lock, click Upgrade your plan: it offers a current plan that includes it, or the API, webhook & MCP access add-on.

The MCP server is the one part that is not in every plan. It comes with the Subi Plus plan and some older plans, or with the MCP add-on, listed at $49 per month. On every paid plan that does not already include it, older plans included, the Add ons page names it MCP server access, since the API and webhooks are already included; on the Free plan some stores see it named API, webhook & MCP access.

What You Can Do with the Subi API

Using the Subi API, you can:

  • Read your subscribers and their details

  • Read subscription contracts, one at a time or as a paginated list

  • Cancel, pause, resume, skip or reschedule a subscription contract

  • Update the lines on a contract: swap a variant, change a quantity or a line discount, add a line, remove a line

  • Keep your own systems in step with your subscription data

  • See which Shopify order started each subscription contract

  • Find a customer’s subscription contracts by their email address

  • List, create and delete your webhooks

The API works on subscriptions that already exist. It does not create a subscription and it does not delete one. A subscription starts when a customer checks out with a subscription plan, or when you create it for them in the Subi admin, and it ends when it is cancelled or when it reaches the end of its cycles. A contract you read from the API can be ACTIVE, PAUSED, FAILED, CANCELLED, EXPIRED or DEACTIVATED, so handle all six.

Who it's for: This feature is intended for developers and technical users who want full programmatic control over contract and subscription data.

Finding a customer’s subscriptions and the order that started them

Every subscription contract the API returns, in the list, one at a time, after a reschedule and after a line change, carries origin_order_id next to id. It is Shopify’s numeric ID of the order that created the subscription, the same number that ends the order’s address in your Shopify admin. It is null when no order started the subscription, for example one you created for a customer in the Subi admin. The same answers carry the customer's email address and name, customer_email, customer_first_name and customer_last_name, next to customer_id. A field Subi has no value for is null.

To list only one customer’s subscription contracts, add email to the list request: GET https://api.subi.co/public/v1.0/subscription-contracts/?email=jane%40example.com (%40 is how a URL writes @). The address must match in full, but upper and lower case don’t matter, so Jane%40Example.com finds the same contracts. customer_email works the same way. An address with no customer in your store gives an empty list, not an error.

Managing webhooks with your API key

You can also list, create and delete your store’s webhooks from the API, with the same X-Api-Key header: GET and POST on https://api.subi.co/public/v1.0/webhooks/, and DELETE on https://api.subi.co/public/v1.0/webhooks/<id>/. The rules are the same as in Settings > Webhooks: your plan must include webhooks, the URL must start with https:// and point to a public server, each event takes at most 5 URLs, and the same URL can’t be added twice for one event. The API never shows your webhook signing secret.

📘 Note: a webhook you create from the API delivers nothing until webhooks are turned on for your store. Open Settings > Webhooks in Subi, open More actions and click Turn on webhooks once; the API can’t do that step for you. See How to set up and manage Webhooks in Subi.

How to Generate an API Key

To access the Subi API, you’ll need to generate an API key from your Subi dashboard.

Steps to generate your API key:

  1. Log in to your Subi dashboard.

  2. Go to Settings.

  3. Click on API keys.

  4. Select Generate API key.

  5. Copy and securely store your API key.

⚠️ Important: Keep your API key confidential. Do not share it publicly or expose it in any client-side code.
​
​

API Key Management Screen

Subi company logo

This image shows the API Keys section in the Subi dashboard, where you can generate and manage keys to connect with external systems.

Authenticating API Requests

Every request carries your key in the X-Api-Key header.

Standard endpoints allow 60 requests per minute. Past that the API answers 429 Too Many Requests. List endpoints are paginated with limit (15 by default, 100 at most) and offset, and each response carries the total count with the next and previous pages. The contract list also takes updated_at__gte and updated_at__lte, so a sync can read only the contracts changed since its last run, for example ?updated_at__gte=2026-11-01T00:00:00Z.

Changes to one subscription contract have their own limit: 40 changes to the same contract in one hour. Changes through the API, the Subi admin, Shopify Flow and the AI assistant all count toward it together. Past it, a change answers 429 with a message such as "This subscription has reached Subi's limit of 40 changes an hour. It can be changed again in 12 minutes.", and a Retry-After header gives the seconds to wait. Reading a contract is not limited by this, and changes your customers make in their portal do not count.

The Subi API Documentation has every endpoint with example requests and responses.

Build your own subscriber page

You may not need to build anything. The Subi portal works on any site, headless included: your customers log in with a code sent to their email, and your site's account page only needs to link to it. Copy the link under Storefront & Portal > Customer Portal, and see How your subscribers reach their customer portal and log in without a password. In the portal, customers can skip, pause, resume and cancel by default. Moving the next order and swapping a product stay off until you turn them on in Customer Portal Permissions. Changing any of these switches needs Portal permissions, included in the Subi and Subi Plus plans and available as an add-on on Starter. Build your own page when you want it inside your site's design and login.

On a headless or custom-built site, your own account page can show each customer their subscriptions and let them skip, pause, resume, move the next order, swap a product or cancel. Your developer, or the AI assistant they build with, follows five steps:

  1. Keep the key on your server. Call the API from your server or a server function, never from the browser.

  2. Find the subscriber by exact email. Take the email from your own site's login, call GET /public/v1.0/subscribers/?email=&limit=100 and keep only the result whose email matches the customer's exactly, ignoring capitals. The filter also matches part of an address, so without that check one customer could see another's subscriptions. If the exact address is not in the results, read the next page.

  3. List their subscriptions. GET /public/v1.0/subscription-contracts/?customer_id=&limit=100 with the subscriber's id, then GET /public/v1.0/subscription-contracts/<id>/ for each one's products, status and next order date. Status values are in capitals, such as ACTIVE and PAUSED.

  4. Check the subscription is theirs before every change. Read the contract and compare its customer_id with the subscriber's id.

  5. Make the change. POST to /skip/, /pause/, /resume/, /cancel/, or /reschedule/ with a future date, on /public/v1.0/subscription-contracts/<id>; a product swap is PATCH /public/v1.0/subscription-contracts/<id>/lines/ with lines_to_swap. When Subi refuses a change, for example a date in the past, its answer says why: tell your customer in your own words.

There is no GET on a contract's lines and no PATCH, PUT or DELETE on the contract itself; the documentation below lists every route. Try it first on your own test subscription: list, skip, then move the date back.

Where to Find Full API Documentation

For technical specifications, available endpoints, example requests/responses, and authentication details, visit the official API docs:

Need Help?

If you need assistance with the API or have questions about your integration, contact the Subi support team or explore other developer articles in our Help Center.

Did this answer your question?