---
title: "Update user in app"
method: PUT
path: "/v1/users/{appId}/{userId}"
tags: ["Users"]
---

# Update user in app

`PUT /v1/users/{appId}/{userId}`

## Request

- Base URL: `https://api.chat.ethora.com`
- URL: `https://api.chat.ethora.com/v1/users/{appId}/{userId}`
- Auth: HTTP bearer

**Auth**: User JWT

Update an end-user belonging to {appId}.

Auth model:
- `User JWT`: caller must have an AppAcl row for {appId} with
  `application.appUsers.update == true`. Super-admin write bypasses the Acl.
- `B2B Server JWT`: allowed when {appId} is the calling tenant's own
  app or one of its child apps (parentAppId equality). NO Acl lookup.

The `userId` path slot accepts any of:
  - Mongo `_id`            (e.g. `699c6923429c2757ac8ab6a4`)
  - chat `xmppUsername`    (e.g. `<appId>_<id>`)
  - SDK-facing `uuid`
Whichever shape the SDK happens to know is fine; the lookup is always
appId-scoped so it can't cross tenants.

## Path parameters

- `appId` string, required
- `userId` string, required

## Response `200`

```
{
  user: {
    defaultWallet: {
      walletAddress: string
    },
    isSuperAdmin?: {
      read: boolean,
      write: boolean
    },
    _id: string,
    firstName: string,
    lastName: string,
    email: string,
    username: string,
    tags: string[],
    profileImage: string,
    emails: [
      {
        loginType: string,
        email: string,
        verified: boolean,
        _id: string
      }
    ],
    appId: string,
    xmppPassword: string,
    roles: string[],
    isProfileOpen: boolean,
    isAssetsOpen: boolean,
    isAgreeWithTerms: boolean,
    homeScreen: string,
    registrationChannelType: string,
    createdAt: string,
    updatedAt: string
  }
}
```

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: ``` { error: string } ```
- `500`: Internal Server Error

---

[API](https://skmtc.dev/ethora/apis/platform-api.md) · [All operations](https://skmtc.dev/ethora/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ethora/apis/platform-api/revisions/01b6e64378ee?raw)
