PersonalTokens


GET /orgs/{id}/personal-tokens

List the current user's personal tokens for an org

Org membership required. Session-authed (not token-auth) — personal tokens cannot list themselves. Returns metadata only — never the secret value. Scoped to the caller's own tokens in-handler (metadata.userId match), not by org role.

Auth: Bearer token required

Path parameters

NameTypeDescription
idstringOrganization ID or slug

Responses

StatusDescriptionSchema
200OKPersonalTokenList
401UnauthorizedError
403ForbiddenError

POST /orgs/{id}/personal-tokens

Create a personal token

Org membership required. Session-authed (not token-auth) — a token cannot mint more tokens. The raw token is returned exactly once in the response and is never retrievable again.

Auth: Bearer token required

Path parameters

NameTypeDescription
idstringOrganization ID or slug

Request body (application/json)

FieldTypeDescription
namestringToken label (required)
expiresAtstring(date-time)Optional ISO expiry

Responses

StatusDescriptionSchema
201CreatedPersonalTokenCreated
400Bad RequestError
401UnauthorizedError
403ForbiddenError

DELETE /orgs/{id}/personal-tokens/{tokenId}

Revoke a personal token

Org membership required. Session-authed (not token-auth). A user can only revoke their own personal tokens for the org (metadata.userId match, in-handler).

Auth: Bearer token required

Path parameters

NameTypeDescription
idstringOrganization ID or slug
tokenIdstringPersonal token ID

Responses

StatusDescriptionSchema
200OKobject
401UnauthorizedError
403ForbiddenError
404Not FoundError

Schemas

Error

FieldTypeDescription
errorstring(required)
codestring

PersonalTokenCreated

FieldTypeDescription
idstring(required)
namestring | null(required)
tokenPrefixstring | null(required)
expiresAtstring | string | null(required)
createdAtstring | string(required)
tokenstring(required)

PersonalTokenList

Type: object[]