curl --request POST \
--url https://gogs.example.com/api/v1/admin/users \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"email": "[email protected]",
"source_id": 123,
"login_name": "<string>",
"full_name": "<string>",
"password": "<string>",
"send_notify": true
}
'{
"id": 123,
"username": "<string>",
"login": "<string>",
"full_name": "<string>",
"email": "[email protected]",
"avatar_url": "<string>"
}Requires the authenticated user to be a site administrator.
curl --request POST \
--url https://gogs.example.com/api/v1/admin/users \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"email": "[email protected]",
"source_id": 123,
"login_name": "<string>",
"full_name": "<string>",
"password": "<string>",
"send_notify": true
}
'{
"id": 123,
"username": "<string>",
"login": "<string>",
"full_name": "<string>",
"email": "[email protected]",
"avatar_url": "<string>"
}Personal access token. Use format: token {YOUR_ACCESS_TOKEN}