Authentication
Store keys (vtk_...) - making one, Read only and Can edit, the member permissions a key carries, revoking, and keeping keys secret.
Every store API call carries a store key in the Authorization header:
GET /api/v1/stores/3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93/orders HTTP/1.1
Host: <admin host>
Authorization: Bearer vtk_Q3n8xYpLr2Kd7Vb0Wm5Tc9Hf1Js6Ga4EA key belongs to one store and to the member who made it. It is the same kind of key the MCP server takes: one key can serve both.
Store keys
| Format | vtk_ followed by 32 characters (letters, digits, - and _) |
| Header | Authorization: Bearer <key>. Bearer is case-insensitive. |
| Reaches | One store, the one it was made in |
| Acts as | The member who made it, with their permissions at the time of each call |
| Scope | Read only or Can edit |
| Expires | Never. It works until it is revoked, or until its maker loses access to the store. |
| Per store | Up to 25 active keys |
Starsell keeps only a SHA-256 hash of each key, so the full key is shown once, when it is made. The admin lists each key by name with its first characters (vtk_Q3n8xYpL...), its scope, who made it, and when it was last used (for a key used by an MCP client, also which client).
Make a key
Making and revoking keys needs Starsell AI access in the store, because the keys are shared with Starsell AI's MCP server. A key that can edit also needs Products access.
Open the keys
Go to Settings > API and webhooks. Keys are in the API and MCP keys card. (The same list is on Starsell AI > Use your own AI, under Server and keys.)
Name it and pick what it can do
Type a name that says where the key goes, such as n8n or ERP sync. Pick Read only or Can edit, then click Make a key.
Copy it now
The key appears once, with a Copy button: "Copy n8n now. It is shown once." Put it in your server's secrets or your automation tool's credentials. The examples further down the page fill in with it until you click Done, hide the key.
If you lose a key, it can't be shown again. Revoke it and make another.
See API and webhooks for the rest of that settings page.
Read only and Can edit
| Scope | In the API | Can do |
|---|---|---|
| Read only | "scope": "read" | Every GET: the store, orders, products, collections, customers, checkouts, events, webhooks and their delivery log. |
| Can edit | "scope": "write" | Everything a read key can, plus PATCH on orders and products, and creating, changing, testing, deleting and redelivering webhooks. |
A read-only key that tries to write gets 403:
{ "error": { "code": "forbidden", "message": "This key can only read. Make a key that can edit to change things." } }A key's scope can't be changed. Make a new key with the other scope and revoke the old one.
A GET on the base URL (the store) answers with the key's own name and scope, so a script can check what it holds before it tries a write:
{ "data": { "id": "3f6c2a8e-...", "name": "Lumen Home", "key": { "name": "ERP sync", "scope": "write" } } }What a key can reach
A key acts with the permissions of the member who made it, read again on every call. Scope and permission are separate checks: a call needs both.
| Call | Scope | Member permission |
|---|---|---|
GET the store (the base URL) | Read only | Any access to the store |
GET /orders, GET /orders/{orderId} | Read only | Orders |
PATCH /orders/{orderId} | Can edit | Orders |
GET /products, GET /products/{productId} | Read only | Any access to the store |
PATCH /products/{productId} | Can edit | Products |
GET /collections | Read only | Any access to the store |
GET /customers | Read only | Customers |
GET /checkouts, GET /checkouts/{checkoutId} | Read only | Orders |
GET /events | Read only | Orders |
GET /webhooks, GET /webhooks/{webhookId}, GET .../deliveries | Read only | Settings |
POST, PATCH, DELETE on webhooks, test, secret, redeliver | Can edit | Settings |
Owners, admins and store managers have every permission. Staff have Products, Orders, Customers, Files and Starsell AI, so a Staff member's key can't reach webhooks. Custom access has exactly the permissions ticked for that member.
When the member is missing a permission, the call gets 403:
{ "error": { "code": "forbidden", "message": "The member who made this key has no settings access in this store." } }Because permissions are read on every call, changing a member's access changes what their keys can do at once:
- Take a permission away, and their keys get
403on the calls that need it. - Remove them from the store or the organization, and every key they made stops with
401: "The member who made this key no longer has access to this store."
Make shared keys from a role that will stay
A key made by someone who later leaves stops working when they are removed. For an integration the whole team depends on, have an owner or a long-lived admin account make the key.
Revoke a key
In API and MCP keys, click Revoke next to the key and confirm: "Revoke n8n? Anything using it stops working at once." It does: the next call with it gets 401 "This key is not valid or was revoked."
You can revoke keys you made. Members who also have the Settings permission can revoke anyone's key in the store.
To rotate a key without downtime, overlap two:
Make the new key
Make a key with the same scope and a new name, such as ERP sync 2026-11.
Deploy it
Switch your integration to the new key.
Check traffic moved
Wait until the new key shows as used recently and the old key's last use stops changing.
Revoke the old key
Click Revoke on the old one.
Authentication errors
| Status | Code | Message | Why |
|---|---|---|---|
401 | unauthorized | Send Authorization: Bearer <key>. Make a key in Settings, API and webhooks. | No Authorization header, a header that isn't Bearer <key>, or a value that doesn't start with vtk_. |
401 | unauthorized | This key is not valid or was revoked. | A mistyped, unknown or revoked key. |
401 | unauthorized | The member who made this key no longer has access to this store. | Its maker was removed from the store. |
403 | forbidden | This key belongs to another store. | The key is valid, but for a different storeId than the one in the path. |
403 | forbidden | This key can only read. Make a key that can edit to change things. | A write with a read-only key. |
403 | forbidden | The member who made this key has no <permission> access in this store. | See What a key can reach. |
Every 401 also carries WWW-Authenticate: Bearer realm="starsell", error="invalid_token".
Keep keys secret
- Keep keys on servers: in environment variables, a secrets manager, or your automation tool's credential store. Never in frontend code, a mobile app or a public repository.
- Every key starts with
vtk_, so secret scanners and log searches can spot one that leaked. If one did, revoke it first, then work out where it went. - Use one key per integration and name it after it. The key list ("Used 2 minutes ago") and the call log then tell you which integration is calling, and revoking one doesn't break the others.
- Give each integration the smallest scope it needs. A reporting job needs Read only.
The call log
Every call made with a key is logged: the route (GET /orders, PATCH /orders/:id), whether it worked, the error if it didn't, and how long it took. Refused calls are logged too, including a read-only key trying to write and calls over the rate limit. A replayed Idempotency-Key answer shows with (replayed) after the route. Calls are kept for 30 days.
- Starsell AI > Use your own AI shows the latest calls under Recent calls, by key.
- Settings > API and webhooks shows how many API calls the store had in the last 24 hours and how many were refused.
- Changes made through a key show in the store's activity log with the key's name, for example
Marked order #1042 as shipped, tracking RR123456789IL through the API key "ERP sync".
Related: API and webhooks settings, Errors, Pagination and limits, MCP server.