Overview
The Qontext API provides programmatic access to your context repository. Use it to build custom applications, workflows, agents, and internal tools that retrieve, search, create, and update context. All API requests are authenticated using API keys.Creating an API key
Please refer to the API reference for all available endpoints and examples.1
Go to Clients
In the Qontext app, go to the Clients tab. To add an API key, click on + Create API key in the top right corner.

2
Create API key
In the Create an API key window, give your key a name and add an expiration date if required.

3
Copy API key
Copy the API key and store it safely. You will not be able to view it again later.
4
Access Qontext
You can now access the context repository from any application, workflow, or script by passing the key as the
X-API-Key header in API requests.Authentication
Pass the API key as theX-API-Key header:
Rotating an API key
Rotate a key to replace its secret while keeping the key itself in place. Rotate when a secret may have been exposed, when it was shared more widely than intended, or on a regular schedule as part of your security practices. Owners, admins, and the member who created the key can rotate it.The current secret stops working immediately. There is no overlap period, so any client still using the old secret fails until you update it with the new one.
1
Open the API key
In the Qontext app, go to Clients → API Keys. Click the three dots next to the key and choose Rotate, or open the key and select Rotate in the Danger zone.

2
Confirm the rotation
Check that you are rotating the right key, then select Rotate key.
3
Copy the new API key
Copy the new API key and store it safely. You will not be able to view it again later.
4
Update the client
Replace the old secret wherever the key is used and pass the new key as the
X-API-Key header. Send a request to confirm the client works again.What stays the same
Rotation replaces the secret only. The key keeps its name, access controls, expiration date, and retrieval logs, so nothing needs to be set up or granted again. You only swap the secret in the clients that use it. Because the expiration date is kept, rotation does not extend a key’s lifetime — the key still expires on its original date. Expired keys cannot be rotated, so delete them and create a new key instead.Available operations
The API can be used to:- Read files and folders
- Search the context repository
- Create files and folders
- Update files and folders
- Manage clients
- Manage sources
- Retrieve logs
Best practices
One API key per use case or environment.Use separate keys per workflow, agent, or environment. That enables easy revocation of access and makes the origin of retrieval logs clearly identifiable.
Rotate instead of recreating.When a secret needs replacing, rotate the key instead of creating a new one. The key keeps its name, access controls, and retrieval logs, so its usage history stays in one place.
FAQ
What do I do if I lost my API key?
What do I do if I lost my API key?
Rotate the key. Rotation issues a new secret and the key keeps its name, access controls, and retrieval logs, so you only need to update the client that uses it.If you no longer need the key at all, revoke it instead. In the Qontext app, go to Clients → API Keys. Click the three dots next to the key and choose Revoke. Once revoked, the key is automatically disabled and removed from the list.
What's the difference between rotating and revoking an API key?
What's the difference between rotating and revoking an API key?
Rotate a key when the key itself should stay in place: it issues a new secret and keeps the key’s name, access controls, expiration date, and retrieval logs. Revoke a key when it should no longer exist: the key is permanently disabled and removed from the list, and you create a new key if you want to connect a client again.
Does rotating a key interrupt the clients using it?
Does rotating a key interrupt the clients using it?
Yes, until you update them. The old secret stops working the moment you rotate, and there is no overlap period during which both secrets are valid. Rotate at a time when you can update every client that uses the key right away.