Profile
Upload profile picture
POST
/api/v1/users/profile/avatarUploads and sets a new profile picture, replacing the previous one.
Requires Authorization
Authenticated action
Form fields
avatarfilerequired | Image file (JPEG, PNG, or WEBP). |
Possible errors
| 422 | VALIDATION_ERROR | Aucun fichier image fourni. |
Request
curl --request POST \
--url https://api.swiftgoma.com/api/v1/users/profile/avatar \
--header 'Authorization: Bearer <access_token>' \
--form 'avatar=@/path/to/file.jpg'200Example response
{
"success": true,
"data": {
"id": "3f2a1c9e-7b41-4e2a-9c31-8e6b2d4f10aa",
"name": "Aline Mapendo",
"role": "BUYER",
"email": "aline@example.com",
"isEmailVerified": true,
"phone": "243812345678",
"isPhoneVerified": true,
"preferredCurrency": "USD",
"avatarUrl": "https://res.cloudinary.com/dx3wclabo/image/upload/v1/avatars/aline.jpg",
"isBlocked": false,
"createdAt": "2026-01-14T10:32:00.000Z"
}
}