Skip to main content
API tokens are long-lived credentials used to authenticate programmatic access to the Entri REST API. Every token is prefixed with entri_ and is scoped to an organization or a specific project. You can manage tokens from the Entri web app (organization settings), or programmatically through the API token endpoints documented here. Programmatic management is useful for automated credential rotation, onboarding scripts, or CI/CD bootstrap pipelines.
The full token value is only returned once — at creation time. After that, the token hash is never exposed. Treat tokens like passwords and store them in a secrets manager.

Endpoints

Organization-level tokens
Project-level tokens

Create a Token

Request body: Response:
The token field contains the full token value. Copy it now — it will not be shown again.

List Tokens

Returns all active tokens for the organization. The full token value is never returned in list responses:
Response:

Revoke a Token

Revoking a token immediately invalidates it. Any in-flight requests using the token will fail with 401 Unauthorized:

Token Expiration

Tokens can optionally expire. Set expiresAt to an ISO 8601 datetime when creating a token. After that date, the token is automatically rejected with a 401 Unauthorized response, even if it has not been explicitly revoked. Tokens without an expiresAt value never expire automatically. Rotate them manually as part of your security hygiene.

Token Rotation

To rotate a token without downtime:
1

Create a new token

2

Update your secrets

Update the token value in your CI/CD secrets, environment variables, or secrets manager with the new value.
3

Revoke the old token

Once the new token is in place and working, revoke the old one:

Key Notes

  • Give each token a descriptive name that identifies its purpose and the system using it. This makes it easy to understand which token to revoke if one is compromised.
  • The lastUsedAt field helps identify stale tokens that can be safely revoked.
  • Use expiresAt to enforce automatic expiry for short-lived automation credentials.