Creating an API Key
- Open app.vidoc.dev or your custom deployment URL, then select your project
- Navigate to Project switcher > API keys
- Click “Create new key”
- Enter a name (e.g., “CI pipeline”, “Local Development”)
- Pick an expiry: 1 day, 1 week, 1 month (default), 6 months or 1 year
- Confirm and copy the key
API Key Properties
Using API Keys
CLI Authentication
VIDOC_TOKEN by default. To use a different variable, set token_env in a CLI profile.
Self-hosted: set
VIDOC_API_URL to your own API address before you run the CLI. For interactive login, use vidoc login --url https://api.example.com with your installation address. Refer to Install and log in.API Authentication
First, select your deployment API address and setVIDOC_API_URL.
Send the key in the x-vidoc-token header:
Authorization: Bearer. See API Authentication for the routes and the error contract.
MCP Authentication
The MCP server accepts user API keys in theAuthorization: Bearer <key> header at /mcp. System, GitHub, and legacy tokens cannot connect. Each connection has access to the project of the key.
Refer to MCP setup for Claude Code, Cursor, and MCP Inspector configuration.
Managing API Keys
View Keys
- Go to Project switcher > API keys
- My API Keys lists the keys you created in this project, with their expiry and creation dates
- Legacy Tokens lists older tokens without an owner (type
legacy) and tokens the platform created (system,github). You see your own; admins see all
Delete a Key
- Find the key in the list
- Click “Delete”
- Confirm
api_key:delete (roles security_engineer and admin). A developer can create keys but not delete them.
Rotate Keys
To rotate a key before it expires:- Create a new key
- Update your CI/CD pipelines with the new key
- Verify scans work with the new key
- Delete the old key
Best Practices
Use Descriptive Names
Name keys by their purpose:github-actions-prodgitlab-ci-staginglocal-dev-alice
One Key Per Purpose
Create separate keys for:- Each CI/CD pipeline
- Each developer (for local development)
- Each environment
Secure Storage
Plan for Expiry
Every key has an expiry date:- Pick 6 months or 1 year for production pipelines and note the date
- Rotate before the expiry date, after a team member departs, and after any suspected compromise
- Use 1 day or 1 week for one-off scripts
Permissions
A key acts with the role of the user who created it. The REST API checks one permission per route:
A
read_only member cannot create keys, so every key created in the dashboard has at least the developer role. Status changes and scan starts with POST /v1/scans also need a key with an owner: keys from My API Keys qualify; legacy, system and GitHub tokens do not.
Roles are managed through Team Members.
Rate Limits
The API does not rate-limit requests today. Rate limiting is planned; until then, keep bulk requests at 100 items or fewer and avoid tight polling loops.Troubleshooting
”Token is missing”
The request has nox-vidoc-token header. The REST API does not read Authorization: Bearer or X-API-Key.
”Invalid or expired token”
- Verify the key was copied correctly, with no extra whitespace
- Check the Expires date in the list; create a new key if it has passed
- Ensure the key hasn’t been deleted
- Verify you’re using a key of the right project; a key of a deleted project is also invalid
”Missing required permission(s): …”
The role of the key’s creator lacks the permission for that route. Use a key created by adeveloper, security_engineer or admin.
”Status changes need a user API key”
The key has no owner (a legacy, system or GitHub token). Create a key from My API Keys in the dashboard.Related Pages
CLI Authentication
CLI login methods
CI/CD Integration
Pipeline setup
Team Members
Manage access
API Reference
API documentation

