How tokens work
- A token acts as you, with your permissions. It can do what you can do in the UI and nothing more. If your role or group access changes, the token follows.
- Personal tokens carry the
*scope: every scope. See Scopes. - A token belongs to one organization. Create a separate token in each organization you work in.
- You see and manage only your own tokens.
Create a token
1
Open API Access
Go to Settings → API Access and click Create Token.
2
Describe it
Enter a Token Name, for example
CI Pipeline, and optionally a Description.3
Choose an expiration
Pick Never, 7 days, 30 days, 90 days or Custom date.
4
Copy the token
Bentra shows the token once. Copy it and store it somewhere safe, such as your CI system’s secret store.
Delete a token
Open the menu on the token’s row and click Delete token. The token stops working immediately. Calls that use it get401.
Bentra also revokes tokens for you:
- When someone is removed from the organization, all their tokens for it are revoked.
- When someone’s role changes to requester, their tokens are revoked. Requesters can’t use API tokens.
Use a token with the API
Send the token as a bearer token. API Information on the API Access page shows your organization’s base URL and an example request.Interactive API docs
When you’re signed in, open/orgs/<org-id>/api/v1/docs/ to browse the API in Swagger UI and try calls with your token. The OpenAPI specification is at /orgs/<org-id>/api/v1/schema/, also linked from API Information.