curl --request POST \
--url https://api.example.com/api/user/profile-photo \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--data '{}'{
"success": true,
"message": "Profile photo updated successfully",
"data": {
"fieldCount": 0,
"affectedRows": 1,
"insertId": 0,
"info": "Rows matched: 1 Changed: 1 Warnings: 0",
"serverStatus": 2,
"warningStatus": 0,
"changedRows": 1
}
}
Uploads a profile photo for the authenticated user.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/memoowi/e-comm-api-demo-2/llms.txt
Use this file to discover all available pages before exploring further.
Bearer <token>multipart/form-datacurl --request POST \
--url https://api.example.com/api/user/profile-photo \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'x-api-key: your_api_key_here' \
--form 'photo=@/path/to/profile-photo.jpg'
const formData = new FormData();
formData.append('photo', fileInput.files[0]);
fetch('https://api.example.com/api/user/profile-photo', {
method: 'POST',
headers: {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
'x-api-key': 'your_api_key_here'
},
body: formData
})
.then(response => response.json())
.then(data => console.log(data));
{
"success": true,
"message": "Profile photo updated successfully",
"data": {
"fieldCount": 0,
"affectedRows": 1,
"insertId": 0,
"info": "Rows matched: 1 Changed: 1 Warnings: 0",
"serverStatus": 2,
"warningStatus": 0,
"changedRows": 1
}
}
{
"success": false,
"message": "photo is required"
}
photo (must match the multipart form field name)image/jpeg, image/png, image/gif, image/jpg, image/bmp, image/webpuploads/profile-photo/ directory{timestamp}-{random}.{extension} (e.g., 1709123456789-123456789.jpg)uploads/profile-photo/{filename}profile_photo field of the user record/uploads/profile-photo/{filename}curl --request POST \
--url https://api.example.com/api/user/profile-photo \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--data '{}'{
"success": true,
"message": "Profile photo updated successfully",
"data": {
"fieldCount": 0,
"affectedRows": 1,
"insertId": 0,
"info": "Rows matched: 1 Changed: 1 Warnings: 0",
"serverStatus": 2,
"warningStatus": 0,
"changedRows": 1
}
}