For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rename an API token of a user

post
Authorizations
defguard_sessionstringRequired
Path parameters
usernamestringRequired

Name of the user.

token_idinteger · int64Required

ID of the API token.

Body
namestringRequired
Responses
401

Session is missing or invalid.

application/json

Body returned with error responses.

codestring · nullableOptional

Machine-readable error code, returned for selected errors.

msgstringRequired

Human-readable error message.

post/api/v1/user/{username}/api_token/{token_id}/rename
POST /api/v1/user/{username}/api_token/{token_id}/rename HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "msg": "Session is required"
}

Last updated

Was this helpful?