# Create an API key

> An API key lets your own code or another system read and update your store through the Shoprocket API. Create one in Settings > API keys, give it only the permissions it needs, and copy the secret, which is shown once.

Help Centre / Integrations - Updated 2 November 2026

An API key is a secret that lets a program act on your store through the Shoprocket API. That could be an inventory system that updates stock, a script that exports orders each night, or an integration a developer builds for you. The API is included on every plan.

Each key has its own name and its own permissions, so you can give each integration only what it needs, and switch one off without touching the others.

**You don't need an API key to sell on your website.** Embeds use your store's publishable key (it starts `pk_`), which is already in the code you paste and is safe to show. An API key (it starts `sk_`) is secret and belongs only on a server.

## Before you begin

API keys are part of the **Developer tools** app, with **Webhooks**. If you don't see **API keys** under **Settings** in your sidebar, go to **Apps**, find **Developer tools** under **Developers** and click **Add**. See [Add and remove apps](https://shoprocket.io/help/the-apps-page.md).

## Create a key

1. In your dashboard, go to **Settings > API keys** and click **Create key**.
2. Enter a **Name**. Name it after the integration it's for, such as "Inventory sync", so you know what breaks if you revoke it.
3. Choose when it **Expires**: **Never expires**, or after 30, 90 or 365 days.
4. Tick the permissions it needs, grouped by **Products**, **Orders**, **Customers**, **Marketing** and more. Use **Select all** for a whole group, or **Grant full access** for everything the store can do. It is safest to give a key only the permissions it needs.
5. Click **Create key**.

![The Create API key drawer: the name Inventory sync, Expires set to 365 days, and the Products permissions ticked](https://shoprocket.io/img/help/api-keys/create-key.webp)

## Copy the secret now

The new key's secret appears once, at the top of the screen. Click **Copy** and store it somewhere safe, such as your integration's settings or a password manager, then click **I've saved it**.

This is the only time the secret is shown. Shoprocket stores it in a form that can't be read back, so if you lose it, revoke the key and create a new one.

![The key just created, with its secret, the Copy button and I've saved it](https://shoprocket.io/img/help/api-keys/copy-secret.webp)

## Manage your keys

The list shows each key with the end of its secret (such as `sk_...abc123`), its permissions, who created it, when it expires and when it was last used. A key that hasn't been used for a long time is often one you can revoke.

- **Change a key's name or permissions**: click its edit button, make your changes and click **Save**. The secret stays the same.
- **Revoke a key**: click **Revoke** and confirm. It stops working straight away, and any integration using it stops too. This can't be undone.

An expired or revoked key stays in the list, marked **Expired** or **Revoked**, so you can see what it was.

Keep keys out of web pages, apps and emails. Anyone with the secret can do whatever its permissions allow. If you think a key has leaked, revoke it and create a new one.

## For developers

Send the key as a Bearer token. The developer guide covers keys and permissions, the full API reference and how to try it in test mode. See [Authentication](https://shoprocket.io/docs/authentication.md) and [API reference](https://shoprocket.io/docs/api.md).

## Related

- [Webhooks](https://shoprocket.io/help/webhooks.md)
- [Zapier](https://shoprocket.io/help/zapier.md)
- [Embed Shoprocket on any website](https://shoprocket.io/help/embed-on-any-website.md)

[Open API keys in your dashboard](https://app.shoprocket.io/go/settings/api-keys)

---

- HTML version: https://shoprocket.io/help/api-keys
- Language: English (en)
- Also in: [العربية](https://shoprocket.io/ar/help/api-keys.md), [Deutsch](https://shoprocket.io/de/hilfe/einen-api-schluessel-erstellen.md), [Ελληνικά](https://shoprocket.io/el/help/api-keys.md), [Español](https://shoprocket.io/es/ayuda/crear-una-clave-api.md), [Français](https://shoprocket.io/fr/aide/creer-une-cle-api.md), [עברית](https://shoprocket.io/he/help/api-keys.md), [हिन्दी](https://shoprocket.io/hi/help/api-keys.md), [Bahasa Indonesia](https://shoprocket.io/id/bantuan/kunci-api.md), [Italiano](https://shoprocket.io/it/aiuto/creare-una-chiave-api.md), [日本語](https://shoprocket.io/ja/help/api-keys.md), [Lietuvių](https://shoprocket.io/lt/pagalba/sukurkite-api-rakta.md), [Norsk](https://shoprocket.io/nb/hjelp/opprett-en-api-nokkel.md), [Nederlands](https://shoprocket.io/nl/hulp/api-sleutel-aanmaken.md), [Polski](https://shoprocket.io/pl/pomoc/utworz-klucz-api.md), [Português](https://shoprocket.io/pt/ajuda/criar-uma-chave-de-api.md), [Română](https://shoprocket.io/ro/ajutor/creeaza-o-cheie-api.md), [Русский](https://shoprocket.io/ru/help/api-keys.md), [ไทย](https://shoprocket.io/th/help/api-keys.md), [Türkçe](https://shoprocket.io/tr/yardim/api-anahtarlari.md), [中文](https://shoprocket.io/zh/help/api-keys.md)
