UpdateProfile
Endpoint
POST /api/user/update-profile
Request Headers
{
"Accept": "application/json",
"Content-Type": "application/json",
"Bearer Token": "17|YROk6eOAMh8596SAONJr8KwQGzmqLXPaTBx5QdBn09989ab0"
}
Request Body
{
"name": "New name",
"email": "[email protected]",
"birthday": "1990-05-14",
"avatar": "selected files" - multipart form data files added like array
}
Response Body (200)
{
"id": 5,
"name": "new name",
"email": "[email protected]",
"birthday": "1990-05-14",
"avatar_url": "http://0.0.0.0:8035/storage/avatars/JP6JbkirqSOK4rgmJQvTESijKv8CExRnecngZQQm.jpg",
"roles": [
"client"
],
"created_at": "2025-09-23 10:42:53"
}
Response Body (401)
{
"message": "Unauthenticated."
}
Response Body (422)
{
"message": "The birthday field must be a valid date.",
"errors": {
"birthday": [
"The birthday field must be a valid date."
]
}
}
Response Body (422)
{
"message": "The email field must be a valid email address.",
"errors": {
"email": [
"The email field must be a valid email address."
]
}
}
Response Body (422)
{
"message": "The avatar field must be an image. (and 1 more error)",
"errors": {
"avatar": [
"The avatar field must be an image.",
"The avatar field must not be greater than 20480 kilobytes."
]
}
}
12 November 2025