Edit an existing user
curl --request PATCH \
--url https://gogs.example.com/api/v1/admin/users/{username} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"source_id": 123,
"login_name": "<string>",
"full_name": "<string>",
"password": "<string>",
"website": "<string>",
"location": "<string>",
"active": true,
"admin": true,
"allow_git_hook": true,
"allow_import_local": true,
"max_repo_creation": 123
}
'{
"id": 123,
"username": "<string>",
"login": "<string>",
"full_name": "<string>",
"email": "jsmith@example.com",
"avatar_url": "<string>"
}Administration
Edit an existing user
Requires the authenticated user to be a site administrator.
PATCH
/
admin
/
users
/
{username}
Edit an existing user
curl --request PATCH \
--url https://gogs.example.com/api/v1/admin/users/{username} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"source_id": 123,
"login_name": "<string>",
"full_name": "<string>",
"password": "<string>",
"website": "<string>",
"location": "<string>",
"active": true,
"admin": true,
"allow_git_hook": true,
"allow_import_local": true,
"max_repo_creation": 123
}
'{
"id": 123,
"username": "<string>",
"login": "<string>",
"full_name": "<string>",
"email": "jsmith@example.com",
"avatar_url": "<string>"
}Authorizations
Personal access token. Use format: token {YOUR_ACCESS_TOKEN}
Path Parameters
Username
Body
application/json