Authentication and keys
Key format, headers, allowed domains (CORS), rotation, revocation and good practice.
Every request to the public REST API authenticates with an API key that belongs to the workspace. There is no user, no password and no session: the key designates the workspace, and its scopes stand in for permissions.
To connect an AI assistant, follow MCP: OAuth and Bearer setup. MCP offers browser OAuth sign-in at its canonical /api/mcp URL or a QuoSuite API key at https://quosuite.com/api/public/v1/quosuite/mcp, with separate authorization steps for each method.
Key format
qss_k3v9x2m4p7r8t1wq_Hq7tY… (40 random characters)
└┬┘ └──────┬───────┘ └────┬────┘
│ public identifier secret
QuoSuite perimeterqss_designates a QuoSuite key (the ERP);qsh_a QuoShop key (the store). A QuoShop key presented to the QuoSuite API, or the reverse, is refused: 403API_KEY_WRONG_PERIMETER.- The identifier (16 characters) is public: it is what the screen shows (
qss_k3v9x2m4p7r8t1wq_••••) and what the audit log quotes. - The secret is never stored by QuoSuite — only its fingerprint is. Nobody, not even support, can give it back to you.
Sending the key
The documented form is the Authorization header:
GET /api/public/v1/quosuite/ping HTTP/1.1
Host: …
Authorization: Bearer qss_k3v9x2m4p7r8t1wq_Hq7tY…X-API-Key: <key> is accepted too: some shared PHP hostings (Apache running CGI) strip the Authorization header before it reaches your code. Sending both with different values answers 400 API_KEY_AMBIGUOUS.
Every response is sealed to the key’s workspace: a resource of another workspace answers 404, exactly like a missing resource.
What is checked, in order
| Check | Refusal |
|---|---|
| IP address blocked after too many authentication failures | 429 API_AUTH_BLOCKED |
| Key present, well formed, valid secret | 401 API_KEY_MISSING, API_KEY_INVALID |
| Key neither revoked nor expired | 401 API_KEY_REVOKED, API_KEY_EXPIRED |
| Allowed origin (call from a browser) | 403 API_ORIGIN_NOT_ALLOWED |
Right perimeter (qss_ on the QuoSuite API) | 403 API_KEY_WRONG_PERIMETER |
| Scope required by the route | 403 API_INSUFFICIENT_SCOPE |
| Active subscription, plan module and option | 403 API_TENANT_INACTIVE, API_MODULE_UNAVAILABLE, API_FEATURE_UNAVAILABLE |
| Key and workspace quota | 429 API_RATE_LIMITED |
A scope or origin refusal does not consume quota: it is decided before.
Allowed domains (CORS)
A key without any domain is a server-to-server key: every browser is refused. It is the default setting, and the right one for a script, a third-party ERP or a CMS plugin calling from PHP.
To call the API from a visitor’s browser (a page of your site), declare the domains of those pages on the key, one per line, with the scheme:
https://shop.example.com
https://*.example.com ← subdomains, but not example.com itself
http://localhost:8080 ← development- The
OPTIONSpreflight is accepted for any origin; it is the actual request that is checked against the key’s domains. Allowed, it receivesAccess-Control-Allow-Origin; refused, it answers 403 without CORS headers — the script only sees a network error, the developer tools show the real status. - Refused on save: a path, a query, credentials, the bare
*wildcard. 20 domains at most per key.
Rotating a key
Settings › API & Integrations › Rotate produces a new value for the same key: same identifier, same scopes, domains, expiry and quota. Choose a grace period:
| Grace | Effect |
|---|---|
| None (immediate cut) | the old value is refused at once |
| 1 hour, 24 hours, 7 days | both values work until the end of the period |
During the grace period, a request made with the old value receives the X-Api-Key-Rotation: <end of grace, ISO 8601> header: watch for it to switch in time. Rotating during an ongoing grace period replaces the value in grace: never more than two valid values.
Revoke, expire, delete
- Revoking is immediate and permanent, across the whole platform, grace period included: the next request is refused (401
API_KEY_REVOKED). - An expiry date is optional; an expired key answers 401
API_KEY_EXPIREDand can be extended by editing its expiry. - A key can only be deleted once revoked.
Every action — creation, update, rotation, revocation — is written to the workspace audit log, with the key’s public prefix, never its value.
Good practice
- One key per integration: you revoke one without cutting the others, and the audit log tells who wrote what.
- Least privilege: Read only as long as the integration does not write, resources ticked one by one otherwise.
- Rotate regularly, with a grace period, and immediately if in doubt.
- Watch the last use and 7-day usage shown on the screen: a forgotten key that is still used is a key to revoke.