---
title: "Update workspace user"
method: PATCH
path: "/api/v1/workspaces/users/{userId}"
tags: ["workspace", "users"]
---

# Update workspace user

`PATCH /api/v1/workspaces/users/{userId}`

Update the metadata of a specific user in the current workspace by user ID.

    You can update:
    - Name or profile picture
    - Workspace role (member or admin)
    - Workspace teams or preferences

    <Callout type="info">
    Email updates are not supported through the public API for security reasons.
    </Callout>

    **Use cases:**
    - Editing user profiles
    - Managing user preferences
    - Updating team assignments

## Path parameters

- `userId` string, required

## Request body

- object
  - `name` string
  - `picture` string, uri
  - `workspaceTeams` object
  - `preferences` object
    - `ossAutoRedirect` boolean
    - `sceneOrder` 'manual' | 'created' | 'updated' | 'name'
    - `initialRedirect` 'dashboard' | 'lastEditedScene' | 'lastVisitedScene' | 'privateCollection'
    - `hideDeprecatedFonts` boolean
    - `enableAutoSceneNamingForPrivateCollections` boolean
    - `blockCommentEmailNotifications` boolean
  - `role` 'member' | 'admin'

## Response `200`

This response returns the updated metadata for the workspace user.

- object — This response returns the updated metadata for the workspace user.
  - `isInitialized` boolean
  - `created` string, date-time, required
  - `uid` string, required
  - `id` string, required
  - `picture` string, uri, required
  - `email` string, email, required
  - `name` string, required
  - `updated` string, date-time, required
  - `workspaceTeams` object, required
  - `subscriptionStatus` string
  - `lastActive` string, date-time
  - `lastActiveRefreshedAt` string, date-time
  - `preferences` object
    - `ossAutoRedirect` boolean
    - `sceneOrder` 'manual' | 'created' | 'updated' | 'name'
    - `initialRedirect` 'dashboard' | 'lastEditedScene' | 'lastVisitedScene' | 'privateCollection'
    - `hideDeprecatedFonts` boolean
    - `enableAutoSceneNamingForPrivateCollections` boolean
    - `blockCommentEmailNotifications` boolean
  - `lastVisitedScenes` string[]
  - `lastEditedScenes` string[]
  - `rateLimits` object
    - `textToDiagram` object
    - `diagramToCode` object
    - `nameScene` object
  - `libraryVersion` number
  - `role` 'member' | 'admin', required

## Other responses

- `401` — This response indicates that the client must authenticate to access the requested resource.
- `403` — This response indicates that the client does not have permission to access the requested resource.
- `404` — This response indicates that the requested resource could not be found.

---

[API](https://skmtc.net/excalidraw/apis/excalidraw-api.md) · [All operations](https://skmtc.net/excalidraw/apis/excalidraw-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/excalidraw/excalidraw-api/revisions/c1404d1545ba/schema)
