Skip to content
Quenza
MCPNew: use this help center in Claude, ChatGPT or CursorConnect →

Authentication

2 min read

Authenticate every Quenza API request with your workspace's API token in a Bearer header, and keep the token out of code and browsers.

Every request to the API carries your workspace’s API token. Quenza uses it to know which workspace you work in and on whose behalf.

A workspace Owner or Manager creates the token under Developer Tools → API Token with Generate. Quenza shows it only once, so copy it straight into a password manager or your server’s secret store. API shows each step with screenshots.

A workspace has one token. It acts as the professional who created it: clients and groups you create through the API are assigned to them, and their time zone is the default for new clients and members.

Put the token in the Authorization header of every request, after the word Bearer:

GET /v1/clients HTTP/1.1
Host: developers.quenza.com
Authorization: Bearer your-token
Accept: application/json

The examples in this reference read the token from an environment variable called QUENZA_API_TOKEN:

const response = await fetch('https://developers.quenza.com/v1/members', {
headers: {
Authorization: `Bearer ${process.env.QUENZA_API_TOKEN}`,
Accept: 'application/json',
},
});

The token can read and change every client, group and team member in your workspace. Treat it like a password:

  • Call the API from your server, never from a web page or a mobile app, where anyone can read the token.
  • Keep it in an environment variable or a secret store, not in your code or a Git repository.
  • Give each integration only to people who need it, and regenerate the token when one of them leaves.

When you regenerate the token, the old one stops working immediately. Update every integration that used it.

Quenza answers with 401 and a message that says why:

Message What it means
Unauthenticated. The header is missing, or the token is wrong or was regenerated.
Invalid token type. The token is not an API token, for example a token from a login session.
No workspace associated with this token. The token belongs to no workspace. Create a new one.
No professional record found for this token. The professional who created the token is no longer in the workspace. Create a new token.

Two other answers concern the workspace, not the token: 402 when the workspace has no active subscription or trial, and 403 when its plan does not include the API. See Errors.

Enlarged screenshot from this article