Excalidraw+ API

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 role (member or admin)
  • 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}

Authorization

apiKey
headerAuthorizationBearer <Bearer>

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

Path Parameters

userId*string

Request Body

application/json
  1. body
name?string
picture?|null
workspaceTeams?
preferences?
role?string
Value in"member""admin"

Response Body

This response returns the updated metadata for the workspace user.

application/json
  1. response

This response returns the updated metadata for the workspace user.

isInitialized?boolean
created*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
uid*string|null
id*string
picture*|null
email*string
Match^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Formatemail
name*string
updated*|null
workspaceTeams*
subscriptionStatus?string
lastActive?|null
lastActiveRefreshedAt?string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
preferences?
lastVisitedScenes?array<string>
lastEditedScenes?array<string>
rateLimits?
libraryVersion?number
role*string
Value in"member""admin"
Example Request
curl -X PATCH 'https://api.excalidraw.com/api/v1/workspaces/users/string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "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,
    "pushToTalkEnabled": true,
    "theme": "light",
    "locale": "en",
    "localeSuggestionDismissed": true,
    "showHints": true,
    "minimapEnabled": true,
    "bindingPreference": "enabled",
    "isMidpointSnappingEnabled": 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,
  "role": "member"
}

Last updated on