API keys
An API key is the password your server uses to call AskVault. Each key works for one workspace only, so requests carry no workspace id.
Before you start
Starter+- The workspace owner creates and revokes keys. Other roles do not see them.
- Your email must be verified. See Your account.
- You can have up to 10 active keys per workspace.
Create a key
- Open Channels & Apps, then the Developers tab.
- Under API keys, enter a name and create the key.
- Copy the key from the box that appears. You can rename it later.
- Open Channels and choose REST API.
- Select Generate Secret Key. The key is named for you (API Key 1, API Key 2 and so on), so keep your own note of which key is used where.
- Copy the key from the banner above the list right away. It looks like
ak_followed by 64 hexadecimal characters.
AskVault stores only a SHA-256 hash of the key, so the full key cannot be shown again. If you lose it, create a new one and revoke the old one.
Use a key
Send it as a Bearer token on every request to /v1/...:
Authorization: Bearer ak_yourkeyhereWrite the literal word Bearer, one space, then the full key including ak_. Any other header form is rejected with HTTP 401 before the key is looked up. Keep keys on your server: never ship one in a web page, a mobile app or a repository.
Rate limits per key
Each key starts at 60 requests a minute and 1,000 requests a day. The limits belong to the key, not the plan, so two keys on one workspace have independent budgets. Give each integration its own key.
Each key row shows its limits and how many questions it answered today. Edit the per-minute and per-day limits on the row. A key can be set up to 1,000 requests a minute and 100,000 a day.
The dashboard does not change a key's limits. Email [email protected] to raise them.
Revoke a key
Choose Revoke on the key's row and confirm. The key stops working immediately and every request with it returns HTTP 401. Revoking cannot be undone.
Rotate a key
- Create a second key and deploy it to your integration.
- Check that requests succeed with the new key.
- Revoke the old one.
Rotate on a schedule that fits your security policy, and straight away if a key may have leaked. Resetting your account password does not change your API keys.
Check it worked
curl https://api.askvault.co/v1/agent/capabilities \ -H "Authorization: Bearer ak_xxx"A valid key returns your workspace name and what the agent can do. A wrong or revoked key returns 401.
If it doesn't work
401 with a key that looks right. The header must be exactly Bearer ak_.... A revoked key also returns 401.
403 saying a higher plan is required. Your plan does not include API access. Upgrade on the Billing page.
"Maximum 10 active API keys". Revoke a key you no longer use.
429. You hit the key's per-minute or per-day limit. See API errors and rate limits.