Update My Profile
Overview
Partially update the signed-in chat participant's own profile. Identity comes from the Bearer token - no path id is required.
Editable fields:
nameprofileImagemetadata
Provide at least one of name or profileImage. Use this from chat settings for display name and avatar. For another user's email or role, use Update User. For Platform client branding, use Platform → Update Profile.
When to use this endpoint?
Use Update My Profile when:
- The chat participant renames themselves in settings (
nameonly). - They change their chat avatar URL (
profileImageonly). - They store chat preferences in metadata (theme, locale, and so on).
- Chat settings saves several of the fields above in one request.
Part of the Chat User APIs. An empty body or a body without name / profileImage returns 400.
Editable Fields
Single-Field Updates
Examples for updating one concern at a time:
Name only
{ "name": "New Name"}Profile image only
{ "profileImage": "https://example.com/profile-image.png"}Metadata (with a name or image also required by validation)
{ "metadata": { "theme": "dark" }}{baseUrl}/api/{apiVersion}/user/profile/me- Authentication
- Required (Bearer token)
- Tenant-scoped
- Yes (tenant DB - requires x-client-id)
Request Headers
Request Payload
Combined example updating name, avatar, and metadata:
{ "name": "New Name", "profileImage": "https://example.com/profile-image.png", "metadata": { "theme": "dark" }}Success Response (HTTP 200 OK)
On success, the API returns the updated profile summary.
{ "success": true, "message": "Profile updated successfully", "data": { "_id": "6a58...90d", "name": "New Name", "email": "will.smith@example.com", "role": "user", "profileImage": "https://example.com/profile-image.png" }, "error": null}Common Errors
Profile update fails when nothing is provided to update or the token is missing.
HTTP 400 Bad Request - Nothing to update
{ "success": false, "message": "Provide at least one of: name, profileImage", "data": null, "error": null}HTTP 401 Unauthorized - No token
{ "success": false, "message": "No token, authorization denied", "data": null, "error": "Unauthorized"}Best Practices
- Upload the avatar to storage first, then send the public URL as
profileImage. - Prefer single-field saves from chat settings for clearer UX.
- Refresh the chat shell avatar and name from the success response.
- Always send tenant headers with the chat user Bearer token over HTTPS.
Chat profile updated
Update the chat header and sidebar from the response, or call Get My Profile again if your client prefers a separate reload.