Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

List Tokens

List every personal API token on the account — names, scopes, status, expiry. Secrets are never returned.

GET/api/public/v1/tokens

Lists every personal API token on the account — active, expired, and revoked — with metadata only. Secrets are never returned after creation; the preview field shows just enough (prefix + last 4 characters) to match a token you hold against its record.

Use this to audit what can access the account, find the id to pass to revoke, and check how close you are to the 25-active-token cap before creating more.

Requirements: any valid token — token management needs no specific scope or feature flag, and works pre-claim.

No parameters.

tokensobject[]
token
idstring

Token ID — pass to DELETE /tokens/{tokenId}.

namestring

Human-readable label set at creation.

previewstring

Masked secret, e.g. ot_pat_c3f9********bd21 — prefix plus the last 4 characters.

scopesstring[]

The token’s scopes, sorted.

statusstring

active, expired (past expiresAt), or revoked.

organizationIdstring | null

The organization the token is bound to, when applicable.

createdAtstring

ISO creation timestamp.

lastUsedAtstring | null

Last time the token authenticated a request — null means never used.

expiresAtstring | null

When the token stops working; null means no expiry.

revokedAtstring | null

When the token was revoked; null unless revoked.

StatuscodeMeaning
401UNAUTHORIZEDMissing or invalid token