v51

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-01140309549.5 KB
users
tokens

Create a token

DEPRECATED: User API tokens have been deprecated in favor of user API keys, so this endpoint always fails with a 403 Forbidden error. Create a user API key instead. Existing API tokens continue to work and can still be viewed, updated, and revoked.

post/v0/users/{user}/tokens

Path parameters

userstring required

The slug or UUID for a user.

Request body

namestring required
ttlinteger nullable

The time-to-live (TTL) for the token in seconds. If not provided, the token will not expire for over 128 years.

Response

successful creation

creationstring date-time required
expirationstring date-time required
namestring required
revokedstring date-time
tokenstring required
userstring uuid required
uuidstring uuid required