This endpoint is used to upload avatar for user profile and returns the URL for the avatar image.
POST musora-api/avatar/upload
- Only authenticated user
Type | Key | Required | Notes |
---|---|---|---|
body | file | yes | File upload |
$.ajax({
url: 'https://www.domain.com' +
'/musora-api/avatar/upload',
type: 'POST',
success: function(response) {
// handle success
},
error: function(response) {
// handle error
}
});
{
"data": [
{
"url": "https://dzryyo1we6bm3.cloudfront.net/avatars/-1616052766-424855.jpg"
}
]
}