Automate
API tokens
Create, use and revoke the tokens that let scripts and CI act for your organization.
An API token lets a script, CI job or AI assistant access one organization without a signed-in user. Tokens live in Settings → API.
Create a token
Open the dialog
Go to Settings → API and select New token. Owners and admins see the button. Members only see the list.
Configure the token
Enter a Name of up to 80 characters that says where the token is used, such as GitHub Actions. Choose Permissions: Read and write or Read only. Choose an Expiration: 7, 30, 90 or 365 days, or No expiration. The default is 90 days. Select Create token.
Copy the value
The Copy your token dialog shows the full token once. Copy it and store it as a secret. You won't see it again.
To check the token, list your projects with it. Replace the host with your OpenPerf API URL:
curl https://api.example.com/api/v1/projects \
-H "Authorization: Bearer $OPENPERF_AUTH_TOKEN"A token starts with opt_ followed by 43 random characters. The list shows only its first 10 characters.
Where a token works
The token acts as the organization. It is not tied to the person who created it.
| Where | How to pass it | What it can do |
|---|---|---|
| CLI | --token or the OPENPERF_AUTH_TOKEN variable | Create releases and upload source maps. |
| MCP server | Authorization: Bearer opt_… header | Call the MCP tools. |
| HTTP API | Authorization: Bearer opt_… header | Manage projects, hide environments, manage releases and deploys, read release health, upload source maps. |
Other API endpoints accept only a signed-in person. With a token they answer 403 and the code API_TOKEN_NOT_ALLOWED. That includes errors, traces, logs, alerts, integrations, webhooks, the audit log and the tokens themselves. To read telemetry with a token, use the MCP server.
The token list
Each row shows the name, the first characters of the token, who created it and when it was last used, or Never used. Last use is updated at most once a minute.
Two badges can appear next to the name:
| Badge | Meaning |
|---|---|
| Read only | The token can read but not change data. Write requests answer 403, and the MCP server does not offer update_error_group_status. |
| Expired | The token is past its expiry date. It is rejected like an unknown token, and the audit log records api_token.expired. |
A token with an expiry date that has not passed shows Expires and the time left.
Owners also see a history button on each row. It opens the audit log filtered to what that token did.
Revoke a token
Select Revoke on the token's row and confirm. Requests with this token fail right away, and this can't be undone. Owners and admins can revoke any token of the organization.
Revoke a token when the person or system that holds it should no longer have access, then create a new one. Deleting the organization deletes its tokens too.
Common mistakes
401withAPI_TOKEN_INVALID. The token is mistyped, revoked or expired. A value that does not start withopt_gets401withAUTHENTICATION_REQUIREDinstead. Send it asAuthorization: Bearer <token>, with nothing else in the header.429withRATE_LIMITED. Too many requests with invalid tokens came from your address. Fix the token and wait a minute.403withAPI_TOKEN_NOT_ALLOWED. The endpoint does not accept tokens, or a read-only token tried to change data.