Skip to main content

Creating an API Key in Stay AI

Written by Jordan Wheelock

API keys let you connect third-party tools and custom integrations to your Stay AI account, giving them secure, permission-scoped access to your subscription data. Follow the steps below to get started.

1. Open the New API Key Modal

Navigate to the API Tokens settings page to see all existing keys on your account.

To get started:

  1. Navigate to Account > API Tokens.

  2. Click New API Key in the top-right corner.

A modal will open where you'll configure your new key.

2. Fill Out Your Key Details

In the New API Key modal, complete the following fields:

  1. Name — A label to help you identify this key in your API Tokens list later. Use something specific to what the key is for (e.g., Shopify Discount Code Flow Key).

  2. Description — A short internal note on what this key is used for (e.g., Used for Shopify Flow to add discounts to subscriptions based on Shopify customer tag).

  3. Email — The email address of the person creating the key. This will be visible in your API Tokens list.

📌 Note: Your Name and Description are for your own reference — the Description is stored on the backend and won't be visible to anyone viewing the key elsewhere.

3. Choose Your Scopes

Scopes control exactly what this API key is allowed to do. Only grant the access an integration actually needs.

Select one or more scopes from the dropdown:

Scope

What it allows

All

Full access to every available API endpoint

Read Orders

Query orders, query an order by ID, get order metadata

Read Selling Plan Groups

Query selling plan groups, query a selling plan group by ID

Update Selling Plan Groups

Create or update a selling plan group

Delete Subscriptions

Update subscription status, create orders, pause/unpause, reactivate, cancel

Read Subscriptions

Query all subscriptions, query a subscription by ID, get swap options

Update Subscriptions

Update subscription status, create orders, pause/unpause, reactivate, cancel, skip an order, change frequency, set next billing date, add/update/remove lines, swap a line’s product, add/remove discounts, manage metadata, set shipping address, generate a portal link

Delete Webhooks

Delete a webhook subscription

Read Webhooks

Get existing webhook subscriptions

Update Webhooks

Create a webhook subscription

✅ Best Practice: Choose the narrowest set of scopes that still lets the integration do its job. A key that only needs to read order data shouldn't also have Update or Delete access.

4. Generate and Save Your Key

Click OK to generate the key. It will appear in your API Tokens list, where you can copy it using the copy icon next to the masked key.

📌 Note: Deleting a key from this list immediately invalidates it — any integration using it will stop working right away.

Related Articles

[Link: webhook setup article]

[Link: general integrations overview article]

Did this answer your question?