API keys
Create an API key in the dashboard and use it to authenticate your requests to the Scops Loyalty API.
Every request your systems send to the Scops Loyalty API, whether from a POS, web shop, mobile app backend or ERP, is authenticated with an API key. You create and revoke keys yourself in the dashboard.
How keys work
You send the key in the X-Api-Key header, and no other authentication header is needed.
A key belongs to the organization that is open in the dashboard when you create it. Every request made with the key reads and writes that organization's data, so you never send an organization or tenant ID.
A key can call every endpoint in the API reference, so treat it like a password. The full key is shown only once, right after you create it. Scops Loyalty can't show it to you again.
Create a key
- In the dashboard, open Settings → API keys.
- Click Create new key.
- In the Create API key dialog, enter a Name that says where the key is used, for example
POS – productionorWeb shop. You'll recognize the key by this name when you need to revoke it. Expires in (days) is optional: enter the number of days until the key stops working, for example90, or leave it blank for a key that doesn't expire. - Click Create.

The API key created dialog shows your new key. Click the key to copy it, then save it in your secret manager or server environment variables before you close the dialog.
This is your only chance to copy the key. If you close the dialog without saving it, create a new key and revoke the one you lost.
Use the key
Add the X-Api-Key header to every request. Call https://api.staging.scops-loyalty.com while you build the integration and https://api.production.scops-loyalty.com when you go live. The two environments don't share data, so create a key in each one's dashboard.
curl https://api.production.scops-loyalty.com/wallet-types \
-H "X-Api-Key: $SCOPS_API_KEY"GET /wallet-types only reads data, so it's a safe first call to test a new key. It returns the wallet types configured for your organization.
Errors
If the key is missing or can't be used, the API responds with 401 Unauthorized:
{ "code": "INVALID_API_KEY", "message": "Invalid API key." }code | What it means | What to do |
|---|---|---|
INVALID_API_KEY | The key is wrong, incomplete or has been revoked. | Check that you copied the whole key. If it was revoked, create a new one. |
KEY_EXPIRED | The key has passed its expiration date. | Create a new key and update your integration. |
UNAUTHORIZED | The request has no X-Api-Key header. | Add the header to the request. |
Revoke a key
- Open Settings → API keys.
- Hover over the key and click Revoke.
- Confirm with Revoke.
Revoking takes effect immediately and can't be undone. Every request that uses the key is then rejected with 401 Unauthorized.
The list shows the keys you created for the organization that is currently open, newest first. Keys your teammates created appear only in their own list.
Keep keys safe
- Call the API only from your servers. Never put a key in a website's front-end code, a mobile app or anything else that runs on a customer's device.
- Use a separate key for each integration, for example one for the POS, one for the web shop and one for the ERP. You can then revoke one without breaking the others.
- To rotate a key without downtime, create the new key, deploy it, check that requests succeed, then revoke the old key.
- Store keys in a secret manager or environment variables, not in source control, tickets, email or chat.
- Set an expiration on keys for tests, demos and contractors.
Next steps
- Browse every endpoint in the API reference.
- Create a transaction to see how campaigns reward a purchase.