Create a management key for the signed-in member
const url = 'https://gpu-kitchen.example.lan/api/v1/me/management-keys';const options = { method: 'POST', headers: {cookie: 'gpuk_session=<gpuk_session>', 'Content-Type': 'application/json'}, body: '{"label":"example","role_ceiling":"super_admin","read_only":true,"expires_at":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gpu-kitchen.example.lan/api/v1/me/management-keys \ --header 'Content-Type: application/json' \ --cookie gpuk_session=<gpuk_session> \ --data '{ "label": "example", "role_ceiling": "super_admin", "read_only": true, "expires_at": "2026-04-15T12:00:00Z" }'The token is in this response only, once. The role ceiling defaults to the member’s role short of super_admin; a ceiling above the member’s own role is refused.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Success.
object
object
Key id: the public part of the token.
Highest role the key acts with; the owner’s live role caps it.
A read-only key may only call GET operations.
Non-secret display hint: the head of the token.
The full token. Shown once.
Example
{ "key": { "role_ceiling": "super_admin" }}Error codes: validation_error.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: auth_required.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: cannot_grant_higher_role, forbidden, operator_requires_offer, session_required.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: payload_too_large.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}