Skip to main content

Add an Avatar to My Avatars

This endpoint adds an avatar to my avatars

info

This operation requires authentication.

HTTP Request

POST /api/v2/user/avatar/

Parameters

NameInTypeRequiredDescription
avatarbody/formdatafiletrueAvatar of the user

Example Request

var formdata = new FormData();
formdata.append("avatar", fileInput.files[0], "URL");

var requestOptions = {
method: 'POST',
body: formdata,
redirect: 'follow'
};

fetch("/api/v2/user/avatar/", requestOptions)
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
201CreatedResponse status codeAvatar

Example responses

{
"id": "integer",
"primary": "boolean",
"avatar": "string(uri)",
"date_uploaded": "string",
"user": "integer"
}