How-to
API keys
API keys
An API key lets a program call the ComplexQA HTTP API as you, inside one team. A pipeline, a script, or another product uses it. This is not an MCP key: an MCP key speaks to an agent, an API key speaks to /web_api.
Prerequisites
- You are an accepted member of the team.
- The key is never an administrator, even when you are. Member management, billing, and other administrator actions stay on the signed-in session.
- A
READONLYmember can issue a key. That key can read and cannot change records, the same as the member. - One key is bound to one person and one team. Another team needs another key.
- Every key has a lifetime. The lifetime is from 1 to 90 days. A key without a lifetime is not issued.
Secret
The secret is shown once, on the create dialog. ComplexQA stores only its hash and the last four characters. A lost secret cannot be restored: create a new key and revoke the old one.
Issue a key
- Sign in.
- Open the profile. From a team workspace, AI → API keys opens the same tab.
- Open the API keys tab.
- Press Create key.
- Enter a Name, choose a Team, and set Lifetime, days from 1 to 90.
- Press Create key again.
- Copy the secret. It starts with
cqa_web_api_and then 64 hexadecimal characters.
The list shows the name, the team, the expiry, the last use, and a status: Active, Expired, or Revoked. The hint under the name is the last four characters, not the secret. Active hides expired and revoked keys. All shows them.
Call the API
Send the secret on every request:
POST /web_api/project/search
Authorization: Bearer cqa_web_api_...
Content-Type: application/json
Accept: application/json
{}The host is the same application host you open in the browser. The path starts with /web_api/.
The team is stored on the key. You do not have to send X-Team-Slug. If you send that header, its value must be the slug of the key's team. A different slug is rejected.
The key can read and change the records you can reach in that team, except administrator actions. Creating a test case, updating its title, and searching projects are ordinary calls. Searching team members is an administrator action and is rejected.
The key cannot create, list, or revoke API keys. Those routes accept only a browser session.
A successful call returns api_code 200 and the payload in api_result. A rejected call returns a negative api_code and api_result false.
Revoke a key
- Open the API keys tab.
- Press Revoke on the row.
- Confirm Revoke key.
The next request with that secret is rejected as unauthenticated. Revoke takes effect immediately. There is no window where the old secret and a new one are both valid: create the new key, put it in the caller, then revoke the old one.
A key also stops when you leave the team, when your role no longer allows the call, or when the lifetime ends. Deleting the account removes the keys. The records the key created stay in the team.
Did this page help?