Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!

Rename a user

POST
/admin/users/{username}/rename
curl --request POST \
--url https://gitea.com/api/v1/admin/users/example/rename \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "new_username": "example" }'
username
required
string

Current username of the user

Media typeapplication/json

RenameUserOption options when renaming a user

object
new_username
required

New username for this user. This name cannot be in use yet by any other user.

string
unique items
Examplegenerated
{
"new_username": "example"
}

APIEmpty is an empty response

APIForbiddenError is a forbidden error response

message
string
url
string

APIValidationError is error format response related to input validation

message
string
url
string