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
apiKeyheader
AuthorizationBearer <Bearer>The API will use the Authorization: Bearer <your-key> header for requests.
userId*stringapplication/json- body
name?stringpicture?|nullworkspaceTeams?preferences?role?stringValue in
"member""admin"This response returns the updated metadata for the workspace user.
application/json- response
This response returns the updated metadata for the workspace user.
isInitialized?booleancreated*stringMatch
^(?:(?:\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))$Format
date-timeuid*string|nullid*stringpicture*|nullemail*stringMatch
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Format
emailname*stringupdated*|nullworkspaceTeams*subscriptionStatus?stringlastActive?|nulllastActiveRefreshedAt?stringMatch
^(?:(?:\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))$Format
date-timepreferences?lastVisitedScenes?array<string>lastEditedScenes?array<string>rateLimits?libraryVersion?numberrole*stringValue in
"member""admin"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