v51

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

Create a user API key

Create a new bencher_user_* API key for a user. The plaintext key is only returned once in the response. Only the authenticated user themselves and server admins have access to this endpoint. This endpoint cannot be called with a user API key: a key cannot be used to create another key, so revoking a key also cuts off any credentials that could have been derived from it. Authenticate with a JWT (user session token) instead.

post/v0/users/{user}/keys

Path parameters

userstring required

The slug or UUID for a user.

Request body

namestring required
ttlinteger nullable

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

Response

successful creation

creationstring date-time required
expirationstring date-time required
keystring required
namestring required
userstring uuid required
uuidstring uuid required