E003: Update user
PATCH /api/user
Updates the authenticated user's own profile. The only editable field is displayName; identity (email, Firebase UID) is owned by Firebase and is not editable here.
Authentication
User-scoped route. Requires Authorization: Bearer <firebase-id-token>; X-Org-Id is not required. Access: Authenticated.
Request
{ "displayName": "Jane Q. Doe" }
| Field | Type | Required | Notes |
|---|---|---|---|
displayName | string | no | New display name (1–255 chars). |
Response — 200 OK
{
"user": {
"id": "uuid",
"firebaseUid": "string",
"email": "user@example.com",
"displayName": "Jane Q. Doe"
}
}
Errors
| HTTP | code | Condition |
|---|---|---|
| 401 | unauthorized | Missing, malformed, or rejected Firebase ID token. |
| 404 | not_found | No platform user row for the verified identity. |
| 422 | validation_failed | displayName is out of range. |
Workflow
Calls W003 Update user.