Update Avatar
Update user avatar.
Endpoint
http
POST /api/v1/user/avatarParameters
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
avatar | file | yes | The user avatar image file. Allowed are png, jpg or jpeg. |
Request example
sh
curl --location --request POST 'https://files.ro/api/v1/user/avatar' \
--header 'Content-Type: multipart/form-data' \
--header 'Authorization: Bearer {token}' \
--form 'avatar=@/path/to/file'Response
json
{
"type": "success",
"message": "The avatar was successfully updated."
}json
{
"type": "error",
"message": "You are not authorized"
}json
{
"message": "The given data was invalid.",
"errors": {
"field": [
"The field is required."
]
}
}