Update Avatar
POST
/user/avatar
const url = 'https://gitea.example.com/api/v1/user/avatar';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"image":"example"}'};
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://gitea.example.com/api/v1/user/avatar \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "image": "example" }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”UpdateUserAvatarUserOption options when updating the user avatar
object
image
Image must be base64 encoded
string
Examplegenerated
{ "image": "example"}UpdateUserAvatarUserOption options when updating the user avatar
object
image
Image must be base64 encoded
string
Responses
Section titled “Responses”APIEmpty is an empty response
Media typeapplication/json