Users
Upload avatar
Upload a new profile picture for the authenticated user.
PUT /users/me/avatar
Uploads a new profile picture and returns the updated profile. The request is multipart/form-data with a single file field.
Authentication: Bearer token · Permission:
account:write · Rate limit: 10 / 5 minRequest body
multipart/form-data
file
file required
The image to upload: a PNG, JPEG, GIF or WebP file of 5 MB or less. SVG is refused.
Request
curl -X PUT https://api.twominutereports.com/v1/users/me/avatar \
-H "Authorization: Bearer tmrc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-F "file=@/path/to/avatar.png"
Response
Returns the updated user object with the new avatarUrl.
{
"success": true,
"data": {
"id": "0190f8a1-2b3c-7d4e-8f90-1a2b3c4d5e6f",
"name": "Ada Lovelace",
"firstName": "Ada",
"lastName": "Lovelace",
"email": "[email protected]",
"avatarUrl": "https://assets.gox.ai/tmr/avatars/0190f8a1.png",
"preferences": {
"appearance": "light",
"notifications": {
"email": { "productUpdates": true, "promotional": false }
}
},
"createdAt": "2026-01-12T08:15:00.000Z"
}
}
Returned when the file is not a PNG, JPEG, GIF or WebP image. When no file is sent, the message is No file uploaded.
{
"success": false,
"error": { "code": "BAD_REQUEST", "message": "Only PNG, JPEG, GIF or WebP images are allowed" }
}
{
"success": false,
"error": { "code": "PAYLOAD_TOO_LARGE", "message": "File too large" }
}
{
"success": false,
"error": { "code": "TOO_MANY_REQUESTS", "message": "Too many requests — please slow down and try again later" }
}