Update workspace user

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

You can update:

  • Name or profile picture
  • Workspace teams or preferences

Email updates are not supported through the public API for security reasons.

Use cases:

  • Editing user profiles
  • Managing user preferences
  • Updating team assignments
PATCH
/api/v1/workspaces/users/{userId}
AuthorizationBearer <token>

The API will use the Authorization: Bearer <your-key> header for requests.

In: header

Path Parameters

userId*string

Request Body

application/json

name?string
picture?|
workspaceTeams?
preferences?
[key: string]?never

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.excalidraw.com/api/v1/workspaces/users/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "isInitialized": true,
  "created": "2019-08-24T14:15:22Z",
  "uid": "string",
  "id": "string",
  "picture": "http://example.com",
  "email": "user@example.com",
  "name": "string",
  "updated": "2019-08-24T14:15:22Z",
  "workspaceTeams": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  },
  "subscriptionStatus": "string",
  "lastActive": "2019-08-24T14:15:22Z",
  "lastActiveRefreshedAt": "2019-08-24T14:15:22Z",
  "preferences": {
    "ossAutoRedirect": true,
    "sceneOrder": "manual",
    "initialRedirect": "dashboard",
    "hideDeprecatedFonts": true,
    "enableAutoSceneNamingForPrivateCollections": true,
    "blockCommentEmailNotifications": true
  },
  "lastVisitedScenes": [
    "string"
  ],
  "lastEditedScenes": [
    "string"
  ],
  "rateLimits": {
    "textToDiagram": {
      "property1": {
        "lastUsed": 0,
        "firstUsed": 0,
        "count": 0
      },
      "property2": {
        "lastUsed": 0,
        "firstUsed": 0,
        "count": 0
      }
    },
    "diagramToCode": {
      "property1": {
        "lastUsed": 0,
        "firstUsed": 0,
        "count": 0
      },
      "property2": {
        "lastUsed": 0,
        "firstUsed": 0,
        "count": 0
      }
    },
    "nameScene": {
      "property1": {
        "lastUsed": 0,
        "firstUsed": 0,
        "count": 0
      },
      "property2": {
        "lastUsed": 0,
        "firstUsed": 0,
        "count": 0
      }
    }
  },
  "libraryVersion": 0
}
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "string"
}
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "string"
}
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "string"
}