user.uploadAvatar
post/v1/user/avatar
user.uploadAvatar
Request
Body
{
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"avatar": {
"type": "string",
"format": "binary",
"contentMediaType": "application/octet-stream",
"maxLength": 2048
}
},
"required": [
"avatar"
],
"title": "UserUploadAvatarRequest"
}
}
}
}Responses
200No description
- Schema
Schema Structure
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
}
},
"required": [
"avatar_url"
]
}
},
"required": [
"success",
"data"
]
}
403Authorization error
- Schema
Schema Structure
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Error overview."
}
},
"required": [
"message"
]
}
422Validation error
- Schema
Schema Structure
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Errors overview."
},
"errors": {
"type": "object",
"description": "A detailed description of each field that failed validation.",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"required": [
"message",
"errors"
]
}