API keys are the primary way to authenticate requests to the ByteStack API. Each key is a bearer token that identifies your account and determines what actions the caller is permitted to perform. You can create as many keys as you need — one per service, environment, or team member — and revoke them individually without affecting the rest.Documentation Index
Fetch the complete documentation index at: https://docs.bytestack.com/llms.txt
Use this file to discover all available pages before exploring further.
Create an API key
Name your key
Give the key a descriptive name that identifies where it will be used — for example,
production-backend or ci-pipeline. You cannot rename a key after creation.Choose a scope
Select the minimum scope your integration needs. See key scopes below.
Key scopes
Every API key is assigned one of three scopes. Choose the narrowest scope that covers what your integration needs.read
Query results, storage objects, and job status. Use for dashboards, reporting pipelines, and read-only integrations.
write
Everything in
read, plus creating queries and jobs. Use for backend services that submit queries on behalf of users.admin
Full access, including webhook configuration and API key management. Use only for account-level automation or infrastructure tooling.
Use a key in a request
Include your API key in theAuthorization header of every request as a bearer token.
Best practices
- Use environment variables — store your API key in an environment variable (for example,
BITKIT_API_KEY) and read it at runtime. Never hardcode keys in source files. - Never commit keys to source control — add
.envand any secrets files to.gitignore. Use a secrets manager for production deployments. - Use the minimum required scope — a reporting dashboard only needs
read; a backend service that submits queries needswrite. Reserveadminfor infrastructure tooling only. - Create one key per service — using separate keys for each service or environment makes it easy to rotate or revoke access for a single integration without disrupting others.
Rotate a key
Key rotation is a two-step process that lets you transition without downtime:Create a new key
Go to Settings → API Keys → New Key. Give it the same scope as the key you are replacing and copy the new value.
Update your integration
Replace the old key value with the new key in your environment variables, secrets manager, or deployment configuration. Deploy the change and verify that your integration is working correctly with the new key.
Revoke a key
To revoke a key, go to Settings → API Keys, click the key you want to remove, and select Revoke. Revocation takes effect immediately.If you suspect an API key has been compromised, revoke it immediately and create a replacement. Then audit the affected services to confirm no unauthorized requests were made. Contact legal@bytestack.dev if you believe your account was accessed without authorization.