Skip to main content
CrispStats uses secret API keys that start with cs_sk_ for the REST API, the MCP server and server-side events. Owners and admins create them on the workspace page, under API keys. A key belongs to the workspace, carries one or more scopes, covers every site or just one, and is shown in full only once, right after you create it.

Public key or secret key

Every site has a public key, and a workspace can have any number of secret keys. They do different jobs. To replace a public key, see rotate the public key.

Create a key

1

Open the workspace page

Choose Workspace in the account menu, or Team and API keys below a site’s settings tabs. Under API keys, select Create key.
2

Name the key

Enter what will use it, for example Production backend. The name is how you recognise the key in the list later.
3

Pick the scopes

Tick at least one scope. Read is selected by default. See scopes for what each one allows.
4

Choose the access

Pick Every site in your workspace, or Only one of its sites. A key limited to one site is refused for every other site.
5

Copy the key

Select Create key. The next dialog shows the full key once. Select Copy key, store it in a secret manager or an environment variable, then select I have copied it.
CrispStats keeps only a hash of the key, so it cannot show the key again. If you lose it, revoke it and create a new one.
Keys created in the dashboard do not expire. They work until you revoke or delete them.

Scopes

Give each key only the scopes it needs. A key for a backend that records signups needs events. A key for a spreadsheet or an AI assistant needs read.

Use the key

Send the key as a bearer token in the Authorization header. This lists the sites the key can read:
This reads the headline numbers of one site. Replace SITE_ID with the id from the site’s dashboard address, https://crispstats.com/app/SITE_ID:
When a key cannot be used, the API answers with an error envelope that names the cause:
Each key has its own daily allowance, equal to your plan’s API requests a day, and it resets at midnight UTC. Every key in a workspace also counts toward a workspace ceiling of five times your plan’s daily allowance. See rate limits and authentication.

Revoke or delete a key

The API keys list on the workspace page shows each key’s name, its scopes, the first characters of the key (such as cs_sk_1a2b3c4d…), whether it covers all sites or one, when it was created and when it was last used. Last used is updated at most once a minute; a key that has never made a request shows Never used.
  • Revoke stops the key after you confirm. It stays in the list, crossed out and marked Revoked, as a record.
  • Delete stops the key and removes it from the list. This cannot be undone. You can delete a key that is already revoked.
The REST API and the MCP server refuse a revoked key on the next request. The collector caches key checks for up to a minute, so server-side events with a revoked key can still be accepted for about a minute. Only owners and admins can see, create, revoke or delete keys. Members and viewers see a note that API keys are for owners and admins.

Next steps

API introduction

Endpoints, query parameters and response shapes of REST API v1.

Connect AI assistants

Use a read key with the CrispStats MCP server.

Server-side events

Send events and payments from your backend with an events key.
Last modified on November 25, 2026