> For the complete documentation index, see [llms.txt](https://academy.shade.inc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.shade.inc/developers/workspaces-and-drives/members-and-permissions.md).

# Members & permissions

Invite people to workspaces and drives, change their roles, and grant access to individual files and folders. Groups let you manage access for many people at once.

Roles are integers, so higher numbers grant more access. See `WorkspaceRole` and `DriveRole` in the schemas below for what each value means.

To check what the current user can do on a file or folder, call `GET /workspaces/drives/{drive_id}/file-permissions` or `GET /workspaces/drives/{drive_id}/folder-permissions`.

## Add Users To Group

> Create a new group.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"AddUsersToGroupRequest":{"properties":{"emails":{"items":{"type":"string","format":"email"},"type":"array","title":"The users to add to the group"}},"type":"object","required":["emails"],"title":"AddUsersToGroupRequest"},"GroupDTO":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Name of the group"},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["name","id"],"title":"GroupDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/groups/{group_id}/users":{"post":{"tags":["members-and-permissions"],"summary":"Add Users To Group","description":"Create a new group.","operationId":"addUsersToGroup","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddUsersToGroupRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Remove Users From Group

> Remove users from a group.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"RemoveUsersFromGroupRequest":{"properties":{"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"The users to add to the group"}},"type":"object","required":["user_ids"],"title":"RemoveUsersFromGroupRequest"},"GroupDTO":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Name of the group"},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["name","id"],"title":"GroupDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/groups/{group_id}/users":{"delete":{"tags":["members-and-permissions"],"summary":"Remove Users From Group","description":"Remove users from a group.","operationId":"removeUsersFromGroup","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveUsersFromGroupRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Read Groups

> f\
> Retrieve a list of groups.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"GroupFullDTO":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Name of the group"},"id":{"type":"string","format":"uuid","title":"Id"},"group_type":{"type":"string","title":"Group Type"},"user_count":{"type":"integer","title":"User Count"}},"type":"object","required":["name","id","group_type","user_count"],"title":"GroupFullDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/groups":{"get":{"tags":["members-and-permissions"],"summary":"Read Groups","description":"f\nRetrieve a list of groups.","operationId":"listGroups","parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupFullDTO"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Create New Group

> Create a new group.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"CreateGroupRequest":{"properties":{"name":{"type":"string","title":"The name of the group"},"emails":{"items":{"type":"string","format":"email"},"type":"array","title":"The users to add to the group"}},"type":"object","required":["name","emails"],"title":"CreateGroupRequest"},"GroupDTO":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Name of the group"},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["name","id"],"title":"GroupDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/groups":{"post":{"tags":["members-and-permissions"],"summary":"Create New Group","description":"Create a new group.","operationId":"createGroup","parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Read Group

> Get a specific group by ID.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"GroupWithUsersDTO":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Name of the group"},"id":{"type":"string","format":"uuid","title":"Id"},"group_type":{"type":"string","title":"Group Type"},"user_count":{"type":"integer","title":"User Count"},"users":{"items":{"$ref":"#/components/schemas/UserDTO"},"type":"array","title":"Users"}},"type":"object","required":["name","id","group_type","user_count","users"],"title":"GroupWithUsersDTO"},"UserDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"joined":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joined"}},"type":"object","required":["id","name","email","avatar_url","user_type","external_id"],"title":"UserDTO"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/groups/{group_id}":{"get":{"tags":["members-and-permissions"],"summary":"Read Group","description":"Get a specific group by ID.","operationId":"getGroup","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupWithUsersDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Update Existing Group

> Update a group's name.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UpdateGroupRequest":{"properties":{"name":{"type":"string","title":"The name of the group"}},"type":"object","required":["name"],"title":"UpdateGroupRequest"},"GroupDTO":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Name of the group"},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["name","id"],"title":"GroupDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/groups/{group_id}":{"put":{"tags":["members-and-permissions"],"summary":"Update Existing Group","description":"Update a group's name.","operationId":"updateGroup","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Delete Existing Group

> Delete a group by ID.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/groups/{group_id}":{"delete":{"tags":["members-and-permissions"],"summary":"Delete Existing Group","description":"Delete a group by ID.","operationId":"deleteGroup","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Shares a file (or folder) w user

> Share a file on a workspace.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"ShareFileRequest":{"properties":{"path":{"type":"string","format":"path","title":"The directory path","description":"Path of the file or folder, starting with the drive ID, for example `/7b1e4d2c-5a6f-4e8b-9c3d-2f1a0b9c8d7e/Project/Interviews/A001.mov`."},"invites":{"items":{"$ref":"#/components/schemas/PathInvite"},"type":"array","title":"The workspace invitations","description":"A combination of email and role for the user to invite to the workspace"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The url","description":"The url of the file"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The message","description":"The message to send to the invited users","default":""}},"type":"object","required":["path","invites"],"title":"ShareFileRequest"},"PathInvite":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/DriveRole"}},"type":"object","required":["email","role"],"title":"PathInvite"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/share-file":{"post":{"tags":["members-and-permissions"],"summary":"Shares a file (or folder) w user","description":"Share a file on a workspace.","operationId":"shareFile","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get all files shared with a user

> Get all files shared with a user on a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UserSharesDTO":{"properties":{"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"drive_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Drive Identifier"},"id":{"type":"string","format":"uuid","title":"Id"},"asset":{"anyOf":[{"$ref":"#/components/schemas/AssetDTO"},{"type":"null"}]},"path":{"type":"string","title":"Path"},"role":{"type":"integer","title":"Role"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"}},"type":"object","required":["drive_id","id","path","role","actions"],"title":"UserSharesDTO"},"AssetDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"path":{"type":"string","title":"Path"},"name":{"type":"string","title":"Name"},"extension":{"type":"string","title":"Extension"},"updated":{"type":"string","format":"date-time","title":"Updated"},"created":{"type":"string","format":"date-time","title":"Created"},"type":{"$ref":"#/components/schemas/AssetType"},"size_bytes":{"type":"integer","title":"Size Bytes"},"stack_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Stack Id"},"stack_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stack Number"},"is_fs_draft_blob":{"type":"boolean","title":"Is Fs Draft Blob"},"is_fs_null_blob":{"type":"boolean","title":"Is Fs Null Blob"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"ai_indexed":{"type":"boolean","title":"Ai Indexed"},"system_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"System Metadata","default":{}},"custom_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Metadata","default":{}},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"palette":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array","title":"Palette"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ocr"},"transcription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transcription Id"},"faces_present":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Faces Present"},"content_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Content Length"},"comment_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comment Count"},"preview_job_state":{"$ref":"#/components/schemas/JobState"},"metadata_job_state":{"$ref":"#/components/schemas/JobState"},"custom_metadata_job_state":{"$ref":"#/components/schemas/JobState"},"core_vision_job_state":{"$ref":"#/components/schemas/JobState"},"color_palette_job_state":{"$ref":"#/components/schemas/JobState"},"core_audio_job_state":{"$ref":"#/components/schemas/JobState"},"audio_job_state":{"$ref":"#/components/schemas/JobState"},"facial_recognition_job_state":{"$ref":"#/components/schemas/JobState"},"proxy_job_state":{"$ref":"#/components/schemas/JobState"},"audio_proxy_job_state":{"$ref":"#/components/schemas/JobState"},"transcription_job_state":{"$ref":"#/components/schemas/JobState"},"scrub_sheet_job_state":{"$ref":"#/components/schemas/JobState"},"objects":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Objects"},"texture_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Texture Data"},"integration_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Integration Data"},"preview_images":{"items":{"$ref":"#/components/schemas/PreviewDTO"},"type":"array","title":"Preview Images"},"custom_thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}]},"proxy":{"anyOf":[{"$ref":"#/components/schemas/ProxyDTO"},{"type":"null"}]},"audio_proxy":{"anyOf":[{"$ref":"#/components/schemas/ProxyDTO"},{"type":"null"}]},"scrub_sheet":{"anyOf":[{"$ref":"#/components/schemas/ScrubSheetDTO"},{"type":"null"}]},"grid_scrub_sheet":{"anyOf":[{"$ref":"#/components/schemas/ScrubSheetDTO"},{"type":"null"}]}},"type":"object","required":["id","drive_id","path","name","extension","updated","created","type","size_bytes","is_fs_draft_blob","is_fs_null_blob","ai_indexed","palette","preview_job_state","metadata_job_state","custom_metadata_job_state","core_vision_job_state","color_palette_job_state","core_audio_job_state","facial_recognition_job_state","proxy_job_state","audio_proxy_job_state","transcription_job_state","scrub_sheet_job_state","preview_images"],"title":"AssetDTO","description":"Full asset DTO with relationship fields that require eager loading."},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"JobState":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED","FAILED","INSUFFICIENT_CREDITS"],"title":"JobState","description":"The state of a processing job on an asset, such as previews or transcription."},"PreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"frame":{"type":"integer","title":"Frame"},"signed_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Url"}},"type":"object","required":["id","frame"],"title":"PreviewDTO"},"ProxyDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ProxyDTO"},"ScrubSheetDTO":{"properties":{"preview_width":{"type":"integer","title":"Preview Width"},"preview_height":{"type":"integer","title":"Preview Height"},"columns":{"type":"integer","title":"Columns"},"rows":{"type":"integer","title":"Rows"},"interval":{"type":"number","title":"Interval"},"total_frames":{"type":"integer","title":"Total Frames"},"scrub_sheets":{"items":{"type":"string"},"type":"array","title":"Scrub Sheets"}},"type":"object","required":["preview_width","preview_height","columns","rows","interval","total_frames","scrub_sheets"],"title":"ScrubSheetDTO"},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action","description":"An action a user or share link is allowed to take."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/shared":{"get":{"tags":["members-and-permissions"],"summary":"Get all files shared with a user","description":"Get all files shared with a user on a drive","operationId":"getFilesSharedWithUserOnDrive","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserSharesDTO"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/drives/{drive\_id}/shared/{user\_id}/path

> Removes a share from a path

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"RemoveShareRequest":{"properties":{"path":{"type":"string","format":"path","title":"The directory path","description":"Path of the file or folder, starting with the drive ID, for example `/7b1e4d2c-5a6f-4e8b-9c3d-2f1a0b9c8d7e/Project/Interviews/A001.mov`."}},"type":"object","required":["path"],"title":"RemoveShareRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/shared/{user_id}/path":{"delete":{"tags":["members-and-permissions"],"summary":"Removes a share from a path","operationId":"removeShare","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The user id to remove from path"},"description":"ID of the user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PUT /workspaces/drives/{drive\_id}/users/{user\_id}/path

> Updates people's permissions on a path

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UpdatePathPermissionsRequest":{"properties":{"role":{"$ref":"#/components/schemas/DriveRole","title":"The role to update"},"path":{"type":"string","format":"path","title":"The path to change permissions","description":"Path of the file or folder, starting with the drive ID, for example `/7b1e4d2c-5a6f-4e8b-9c3d-2f1a0b9c8d7e/Project/Interviews/A001.mov`."},"upsert":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"If the user hasn't been shared the file, share it","default":false}},"type":"object","required":["role","path"],"title":"UpdatePathPermissionsRequest"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/users/{user_id}/path":{"put":{"tags":["members-and-permissions"],"summary":"Updates people's permissions on a path","operationId":"updatePathPermissions","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The user id to update"},"description":"ID of the user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePathPermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"null"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/drives/{drive\_id}/file-users

> Lists all the user for a specific path (file or folder).

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"FileUsersDTO":{"properties":{"invited":{"items":{"$ref":"#/components/schemas/UserRoleViaAndMembershipDTO"},"type":"array","title":"Invited"},"not_invited":{"items":{"$ref":"#/components/schemas/FileGuestDTO"},"type":"array","title":"Not Invited"}},"type":"object","required":["invited","not_invited"],"title":"FileUsersDTO"},"UserRoleViaAndMembershipDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"},"role":{"$ref":"#/components/schemas/DriveRole"},"is_contractor":{"type":"boolean","title":"Is Contractor","default":false},"is_workspace_member":{"type":"boolean","title":"Is Workspace Member","default":false},"via":{"$ref":"#/components/schemas/ViaType"},"is_inheriting_as_workspace_member":{"type":"boolean","title":"Is Inheriting As Workspace Member","default":false},"is_pending":{"type":"boolean","title":"Is Pending","default":false}},"type":"object","required":["id","name","email","avatar_url","user_type","role","via"],"title":"UserRoleViaAndMembershipDTO"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"ViaType":{"type":"string","enum":["workspace","drive","folder","direct"],"title":"ViaType"},"FileGuestDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"},"role":{"$ref":"#/components/schemas/DriveRole"},"is_contractor":{"type":"boolean","title":"Is Contractor","default":false},"is_workspace_member":{"type":"boolean","title":"Is Workspace Member","default":false}},"type":"object","required":["id","name","email","avatar_url","user_type","role"],"title":"FileGuestDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/file-users":{"get":{"tags":["members-and-permissions"],"summary":"Lists all the user for a specific path (file or folder).","operationId":"listPathUsers","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"The directory path","format":"path"},"description":"Path of the file or folder, starting with the drive ID, for example `/7b1e4d2c-5a6f-4e8b-9c3d-2f1a0b9c8d7e/Project/Interviews/A001.mov`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUsersDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get your role + actions you can do on a folder (or file if you pass a path)

> Get your role + actions you can do on a file (asset).\
> No need to auth these bc you are checking your role and would get none if you don't have auth.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UserRoleAndActionsDTO":{"properties":{"role":{"anyOf":[{"$ref":"#/components/schemas/DriveRole"},{"type":"null"}]},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"via":{"anyOf":[{"$ref":"#/components/schemas/ViaType"},{"type":"null"}]}},"type":"object","required":["role","actions","via"],"title":"UserRoleAndActionsDTO"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action","description":"An action a user or share link is allowed to take."},"ViaType":{"type":"string","enum":["workspace","drive","folder","direct"],"title":"ViaType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/folder-permissions":{"get":{"tags":["members-and-permissions"],"summary":"Get your role + actions you can do on a folder (or file if you pass a path)","description":"Get your role + actions you can do on a file (asset).\nNo need to auth these bc you are checking your role and would get none if you don't have auth.","operationId":"getFolderAllowedActions","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The Drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"The directory path","format":"path"},"description":"Path of the file or folder, starting with the drive ID, for example `/7b1e4d2c-5a6f-4e8b-9c3d-2f1a0b9c8d7e/Project/Interviews/A001.mov`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UserRoleAndActionsDTO"},{"type":"null"}]}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get your role + actions you can do on an asset

> Get your role + actions you can do on a file (asset).\
> No need to auth these bc you are checking your role and would get none if you don't have auth.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UserRoleAndActionsDTO":{"properties":{"role":{"anyOf":[{"$ref":"#/components/schemas/DriveRole"},{"type":"null"}]},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"via":{"anyOf":[{"$ref":"#/components/schemas/ViaType"},{"type":"null"}]}},"type":"object","required":["role","actions","via"],"title":"UserRoleAndActionsDTO"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action","description":"An action a user or share link is allowed to take."},"ViaType":{"type":"string","enum":["workspace","drive","folder","direct"],"title":"ViaType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/file-permissions":{"get":{"tags":["members-and-permissions"],"summary":"Get your role + actions you can do on an asset","description":"Get your role + actions you can do on a file (asset).\nNo need to auth these bc you are checking your role and would get none if you don't have auth.","operationId":"getFileAllowedActions","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The Drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"asset_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"The id of the file (asset id)","description":"The id of the file (asset id)"},"description":"The id of the file (asset id)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UserRoleAndActionsDTO"},{"type":"null"}]}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Authorize path

> Check whether a user is authed on a path in a drive.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/authorize":{"get":{"tags":["members-and-permissions"],"summary":"Authorize path","description":"Check whether a user is authed on a path in a drive.","operationId":"authorizePath","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"The directory path","format":"path"},"description":"Path of the file or folder, starting with the drive ID, for example `/7b1e4d2c-5a6f-4e8b-9c3d-2f1a0b9c8d7e/Project/Interviews/A001.mov`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Lists all the paths for a user in a specific drive

> Lists all the paths for a specific user on a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"DrivePath":{"properties":{"drive":{"$ref":"#/components/schemas/DriveDTO"},"paths":{"items":{"$ref":"#/components/schemas/PathAccess"},"type":"array","title":"Paths"}},"type":"object","required":["drive","paths"],"title":"DrivePath"},"DriveDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"icon":{"type":"string","title":"Icon"},"settings":{"$ref":"#/components/schemas/DriveSettings"},"type":{"$ref":"#/components/schemas/DriveType"},"identifier":{"type":"string","title":"Identifier"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"member_inherited_role":{"$ref":"#/components/schemas/DriveRole"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"byos":{"anyOf":[{"$ref":"#/components/schemas/DriveByosData"},{"type":"null"}]},"default_storage_backend":{"anyOf":[{"$ref":"#/components/schemas/DriveDefaultStorageBackend"},{"type":"null"}]}},"type":"object","required":["id","name","description","icon","settings","type","identifier","icon_type","member_inherited_role","invite_id","workspace_id","byos","default_storage_backend"],"title":"DriveDTO"},"DriveSettings":{"properties":{"max_storage_bytes":{"type":"integer","title":"Max Storage Bytes"},"mount_path_macos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Macos"},"mount_path_linux":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Linux"},"mount_path_windows":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Windows"}},"type":"object","required":["max_storage_bytes"],"title":"DriveSettings"},"DriveType":{"type":"string","enum":["catalog","magic","vault"],"title":"DriveType"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"DriveByosData":{"properties":{"bucket":{"type":"string","title":"Bucket"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["bucket","endpoint"],"title":"DriveByosData"},"DriveDefaultStorageBackend":{"properties":{"provider":{"type":"string","title":"Provider"},"bucket":{"type":"string","title":"Bucket"}},"type":"object","required":["provider","bucket"],"title":"DriveDefaultStorageBackend"},"PathAccess":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_name":{"type":"string","title":"User Name"},"path":{"type":"string","title":"Path"},"role":{"$ref":"#/components/schemas/DriveRole"}},"type":"object","required":["user_id","user_name","path","role"],"title":"PathAccess"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/user-paths/{user_id}":{"get":{"tags":["members-and-permissions"],"summary":"Lists all the paths for a user in a specific drive","description":"Lists all the paths for a specific user on a drive","operationId":"listUserPathAccessOnDrive","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The user id"},"description":"ID of the user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrivePath"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/drives/{drive\_id}/users

> Lists all the user for a specific drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"DriveUserDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"joined":{"type":"string","format":"date-time","title":"Joined"},"role":{"$ref":"#/components/schemas/DriveRole"},"is_workspace_member":{"type":"boolean","title":"Is Workspace Member","default":false},"is_workspace_owner":{"type":"boolean","title":"Is Workspace Owner","default":false},"is_inherited_manager":{"type":"boolean","title":"Is Inherited Manager","default":false},"is_contractor":{"type":"boolean","title":"Is Contractor","default":false}},"type":"object","required":["id","name","email","avatar_url","user_type","external_id","joined","role"],"title":"DriveUserDTO"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/users":{"get":{"tags":["members-and-permissions"],"summary":"Lists all the user for a specific drive","operationId":"listDriveUsers","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/DriveUserDTO"}},{"type":"null"}]}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/drives/{drive\_id}/send-invites

> Sends invites for user to join a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"InviteUsersToDriveRequest":{"properties":{"invites":{"items":{"$ref":"#/components/schemas/DriveInvite"},"type":"array","title":"The workspace invitations","description":"A combination of email and role for the user to invite to the workspace"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invite message"}},"type":"object","required":["invites","message"],"title":"InviteUsersToDriveRequest"},"DriveInvite":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/DriveRole"}},"type":"object","required":["email","role"],"title":"DriveInvite"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/send-invites":{"post":{"tags":["members-and-permissions"],"summary":"Sends invites for user to join a drive","operationId":"inviteUsersToDrive","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUsersToDriveRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PUT /workspaces/drives/{drive\_id}/users/{user\_id}

> Updates people's permissions on a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UpdateDrivePermissionsRequest":{"properties":{"role":{"$ref":"#/components/schemas/DriveRole","title":"The role to update"}},"type":"object","required":["role"],"title":"UpdateDrivePermissionsRequest"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/users/{user_id}":{"put":{"tags":["members-and-permissions"],"summary":"Updates people's permissions on a drive","operationId":"updateDrivePermissions","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The user id to update"},"description":"ID of the user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDrivePermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"null"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/drives/{drive\_id}/users/{user\_id}

> Removes a user from a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/users/{user_id}":{"delete":{"tags":["members-and-permissions"],"summary":"Removes a user from a drive","operationId":"removeUserFromDrive","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The user id"},"description":"ID of the user."},{"name":"only_remove_direct_access","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Only remove direct access","default":false}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/discoverable

> Lists workspaces matching the user's email domain for joining

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"DiscoverableWorkspaceDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"domain":{"type":"string","title":"Domain"},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"team_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Domain"}},"type":"object","required":["id","name","domain"],"title":"DiscoverableWorkspaceDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/discoverable":{"get":{"tags":["members-and-permissions"],"summary":"Lists workspaces matching the user's email domain for joining","operationId":"listDiscoverableWorkspaces","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscoverableWorkspaceDTO"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/{workspace\_id}/join-by-domain

> Join a workspace when the user's email domain matches team\_domain

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"WorkspaceListDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"domain":{"type":"string","title":"Domain"},"team_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Domain"},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"member_inherited_role":{"$ref":"#/components/schemas/WorkspaceRole"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"type":{"$ref":"#/components/schemas/WorkspaceType"},"onboarding":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Onboarding"},"onboarding_tasks":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Onboarding Tasks"},"settings":{"$ref":"#/components/schemas/WorkspaceSettings"},"trial_started":{"type":"boolean","title":"Trial Started"},"store_analytics":{"type":"boolean","title":"Store Analytics"},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationDTO"},{"type":"null"}]},"client_metadata":{"additionalProperties":true,"type":"object","title":"Client Metadata"},"partner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Id"},"created":{"type":"string","format":"date-time","title":"Created"},"last_accessed":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Accessed"},"sales_settings":{"anyOf":[{"$ref":"#/components/schemas/SalesSettings"},{"type":"null"}]},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"personal":{"type":"boolean","title":"Personal"},"role":{"$ref":"#/components/schemas/WorkspaceRole"}},"type":"object","required":["id","name","description","domain","team_domain","thumbnail","member_inherited_role","invite_id","type","onboarding","settings","trial_started","store_analytics","organization","client_metadata","created","actions","personal","role"],"title":"WorkspaceListDTO"},"WorkspaceRole":{"type":"integer","enum":[60,50,30,20,15,10,0],"title":"WorkspaceRole","description":"A user's role in a workspace. Higher values grant more access."},"WorkspaceType":{"type":"string","enum":["PERSONAL","TEAM"],"title":"WorkspaceType"},"WorkspaceSettings":{"properties":{"transcription_model":{"$ref":"#/components/schemas/TranscriptionModelType"},"default_drive_inheritance":{"anyOf":[{"$ref":"#/components/schemas/DriveRole"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/WorkspaceStatus","default":"ACTIVE"},"link_sharing_enabled":{"type":"boolean","title":"Link Sharing Enabled","default":true},"custom_links_enabled":{"type":"boolean","title":"Custom Links Enabled","default":true},"link_sharing_templates":{"items":{"$ref":"#/components/schemas/WorkspaceLinkSharingTemplate-Output"},"type":"array","title":"Link Sharing Templates"},"default_comments_internal":{"type":"boolean","title":"Default Comments Internal","default":false},"domain_discovery_enabled":{"type":"boolean","title":"Domain Discovery Enabled","default":false}},"type":"object","required":["transcription_model"],"title":"WorkspaceSettings"},"TranscriptionModelType":{"type":"string","enum":["BEST","NANO"],"title":"TranscriptionModelType"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"WorkspaceStatus":{"type":"string","enum":["ACTIVE","WARNED","LOCKED"],"title":"WorkspaceStatus"},"WorkspaceLinkSharingTemplate-Output":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","maxLength":255,"title":"Name"},"allowed_actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Allowed Actions"},"icon":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Icon"},"icon_type":{"type":"string","title":"Icon Type","default":"color"},"settings":{"anyOf":[{"$ref":"#/components/schemas/LinkTemplateSettings-Output"},{"type":"null"}]},"locked":{"type":"boolean","title":"Locked","default":false}},"type":"object","required":["id","name","allowed_actions"],"title":"WorkspaceLinkSharingTemplate"},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action","description":"An action a user or share link is allowed to take."},"LinkTemplateSettings-Output":{"properties":{"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"},"thumbnail_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail View"},"card_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Size"},"metadata_attribute_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute Ids"},"password_required":{"type":"boolean","title":"Password Required","default":false},"expiration_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiration Duration Days"},"max_view_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max View Count"},"watermarking_config":{"anyOf":[{"$ref":"#/components/schemas/WatermarkingConfiguration"},{"type":"null"}]}},"type":"object","title":"LinkTemplateSettings"},"WatermarkingConfiguration":{"properties":{"mode":{"$ref":"#/components/schemas/WatermarkingMode"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"position":{"anyOf":[{"$ref":"#/components/schemas/WatermarkPosition"},{"type":"null"}]},"font_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Font Size"}},"type":"object","required":["mode"],"title":"WatermarkingConfiguration","description":"Typed configuration for text-based watermarking and transcoder options."},"WatermarkingMode":{"type":"string","enum":["session","text"],"title":"WatermarkingMode"},"WatermarkPosition":{"type":"string","enum":["top_left","top_center","top_right","center","bottom_left","bottom_center","bottom_right"],"title":"WatermarkPosition"},"OrganizationDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"url_subdomain":{"type":"string","title":"Url Subdomain"},"email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain"},"client_metadata":{"additionalProperties":true,"type":"object","title":"Client Metadata"},"partnership_type":{"anyOf":[{"$ref":"#/components/schemas/PartnershipType"},{"type":"null"}]},"discount_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Amount"}},"type":"object","required":["id","name","url_subdomain","email_domain","client_metadata","partnership_type","discount_amount"],"title":"OrganizationDTO"},"PartnershipType":{"type":"string","enum":["BRANDING","DISCOUNT","CONTRACT"],"title":"PartnershipType"},"SalesSettings":{"properties":{"account_manager":{"anyOf":[{"$ref":"#/components/schemas/AccountManager"},{"type":"null"}]},"customer_success_manager":{"anyOf":[{"$ref":"#/components/schemas/CustomerSuccessManager"},{"type":"null"}]}},"type":"object","title":"SalesSettings"},"AccountManager":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["name","email"],"title":"AccountManager"},"CustomerSuccessManager":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["name","email"],"title":"CustomerSuccessManager"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/join-by-domain":{"post":{"tags":["members-and-permissions"],"summary":"Join a workspace when the user's email domain matches team_domain","operationId":"joinWorkspaceByDomain","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceListDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Lists all the paths for a user in a specific workspace

> Lists all the paths for a specific user on a workspace

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"DrivePath":{"properties":{"drive":{"$ref":"#/components/schemas/DriveDTO"},"paths":{"items":{"$ref":"#/components/schemas/PathAccess"},"type":"array","title":"Paths"}},"type":"object","required":["drive","paths"],"title":"DrivePath"},"DriveDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"icon":{"type":"string","title":"Icon"},"settings":{"$ref":"#/components/schemas/DriveSettings"},"type":{"$ref":"#/components/schemas/DriveType"},"identifier":{"type":"string","title":"Identifier"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"member_inherited_role":{"$ref":"#/components/schemas/DriveRole"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"byos":{"anyOf":[{"$ref":"#/components/schemas/DriveByosData"},{"type":"null"}]},"default_storage_backend":{"anyOf":[{"$ref":"#/components/schemas/DriveDefaultStorageBackend"},{"type":"null"}]}},"type":"object","required":["id","name","description","icon","settings","type","identifier","icon_type","member_inherited_role","invite_id","workspace_id","byos","default_storage_backend"],"title":"DriveDTO"},"DriveSettings":{"properties":{"max_storage_bytes":{"type":"integer","title":"Max Storage Bytes"},"mount_path_macos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Macos"},"mount_path_linux":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Linux"},"mount_path_windows":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Windows"}},"type":"object","required":["max_storage_bytes"],"title":"DriveSettings"},"DriveType":{"type":"string","enum":["catalog","magic","vault"],"title":"DriveType"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"DriveByosData":{"properties":{"bucket":{"type":"string","title":"Bucket"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["bucket","endpoint"],"title":"DriveByosData"},"DriveDefaultStorageBackend":{"properties":{"provider":{"type":"string","title":"Provider"},"bucket":{"type":"string","title":"Bucket"}},"type":"object","required":["provider","bucket"],"title":"DriveDefaultStorageBackend"},"PathAccess":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_name":{"type":"string","title":"User Name"},"path":{"type":"string","title":"Path"},"role":{"$ref":"#/components/schemas/DriveRole"}},"type":"object","required":["user_id","user_name","path","role"],"title":"PathAccess"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/user-paths/{user_id}":{"get":{"tags":["members-and-permissions"],"summary":"Lists all the paths for a user in a specific workspace","description":"Lists all the paths for a specific user on a workspace","operationId":"listUserPathAccessOnWorkspace","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The user id"},"description":"ID of the user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DrivePath"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Lists all the paths for a specific workspace

> For drive and workspace users, list their access and paths.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"DrivePath":{"properties":{"drive":{"$ref":"#/components/schemas/DriveDTO"},"paths":{"items":{"$ref":"#/components/schemas/PathAccess"},"type":"array","title":"Paths"}},"type":"object","required":["drive","paths"],"title":"DrivePath"},"DriveDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"icon":{"type":"string","title":"Icon"},"settings":{"$ref":"#/components/schemas/DriveSettings"},"type":{"$ref":"#/components/schemas/DriveType"},"identifier":{"type":"string","title":"Identifier"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"member_inherited_role":{"$ref":"#/components/schemas/DriveRole"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"byos":{"anyOf":[{"$ref":"#/components/schemas/DriveByosData"},{"type":"null"}]},"default_storage_backend":{"anyOf":[{"$ref":"#/components/schemas/DriveDefaultStorageBackend"},{"type":"null"}]}},"type":"object","required":["id","name","description","icon","settings","type","identifier","icon_type","member_inherited_role","invite_id","workspace_id","byos","default_storage_backend"],"title":"DriveDTO"},"DriveSettings":{"properties":{"max_storage_bytes":{"type":"integer","title":"Max Storage Bytes"},"mount_path_macos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Macos"},"mount_path_linux":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Linux"},"mount_path_windows":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Windows"}},"type":"object","required":["max_storage_bytes"],"title":"DriveSettings"},"DriveType":{"type":"string","enum":["catalog","magic","vault"],"title":"DriveType"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"DriveByosData":{"properties":{"bucket":{"type":"string","title":"Bucket"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["bucket","endpoint"],"title":"DriveByosData"},"DriveDefaultStorageBackend":{"properties":{"provider":{"type":"string","title":"Provider"},"bucket":{"type":"string","title":"Bucket"}},"type":"object","required":["provider","bucket"],"title":"DriveDefaultStorageBackend"},"PathAccess":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_name":{"type":"string","title":"User Name"},"path":{"type":"string","title":"Path"},"role":{"$ref":"#/components/schemas/DriveRole"}},"type":"object","required":["user_id","user_name","path","role"],"title":"PathAccess"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/user-paths":{"get":{"tags":["members-and-permissions"],"summary":"Lists all the paths for a specific workspace","description":"For drive and workspace users, list their access and paths.","operationId":"listUserPathAccessWorkspaces","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DrivePath"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/{workspace\_id}/users

> Lists all the users for a specific workspace

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"WorkspaceUserDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"joined":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joined"},"role":{"$ref":"#/components/schemas/WorkspaceRole"},"is_workspace_member":{"type":"boolean","title":"Is Workspace Member","default":false},"is_workspace_owner":{"type":"boolean","title":"Is Workspace Owner","default":false},"is_contractor":{"type":"boolean","title":"Is Contractor","default":false}},"type":"object","required":["id","name","email","avatar_url","user_type","external_id","role"],"title":"WorkspaceUserDTO"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"WorkspaceRole":{"type":"integer","enum":[60,50,30,20,15,10,0],"title":"WorkspaceRole","description":"A user's role in a workspace. Higher values grant more access."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/users":{"get":{"tags":["members-and-permissions"],"summary":"Lists all the users for a specific workspace","operationId":"listWorkspaceUsers","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceUserDTO"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/{workspace\_id}/users/count

> Lists count of all the users for a specific workspace

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"WorkspaceUserCountDTO":{"properties":{"total_count":{"type":"integer","title":"Total Count"},"member_count":{"type":"integer","title":"Member Count"},"guest_count":{"type":"integer","title":"Guest Count"},"admin_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Admin Count"}},"type":"object","required":["total_count","member_count","guest_count"],"title":"WorkspaceUserCountDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/users/count":{"get":{"tags":["members-and-permissions"],"summary":"Lists count of all the users for a specific workspace","operationId":"getWorkspaceUserCount","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUserCountDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/{workspace\_id}/send-invites

> Sends invites for user to join a workspace

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"InvitePeopleToWorkspaceRequest":{"properties":{"invites":{"items":{"$ref":"#/components/schemas/WorkspaceInvite"},"type":"array","title":"The workspace invitations","description":"A combination of email and role for the user to invite to the workspace"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The invite message","description":"The message to send to the invited user"}},"type":"object","required":["invites","message"],"title":"InvitePeopleToWorkspaceRequest"},"WorkspaceInvite":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/WorkspaceRole"}},"type":"object","required":["email","role"],"title":"WorkspaceInvite"},"WorkspaceRole":{"type":"integer","enum":[60,50,30,20,15,10,0],"title":"WorkspaceRole","description":"A user's role in a workspace. Higher values grant more access."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/send-invites":{"post":{"tags":["members-and-permissions"],"summary":"Sends invites for user to join a workspace","operationId":"invitePeopleToWorkspace","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePeopleToWorkspaceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Gets data for a specific invitation

> This is a PUBLIC route where anyone can see invites. To see (you've been invited to ... workspace)

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"WorkspaceInviteDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sent_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"sent_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sent By Id"},"sent_to_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent To Email"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"workspace":{"$ref":"#/components/schemas/WorkspaceInvitePreviewDTO"},"workspace_role":{"$ref":"#/components/schemas/WorkspaceRole"},"invite_type":{"$ref":"#/components/schemas/InviteType"},"invite_target":{"$ref":"#/components/schemas/InviteTarget"}},"type":"object","required":["id","sent_by","sent_by_id","sent_to_email","workspace_id","workspace","workspace_role","invite_type","invite_target"],"title":"WorkspaceInviteDTO"},"UserDTOBase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"}},"type":"object","required":["id","name","email","avatar_url","user_type"],"title":"UserDTOBase"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"WorkspaceInvitePreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["id","name","domain"],"title":"WorkspaceInvitePreviewDTO"},"WorkspaceRole":{"type":"integer","enum":[60,50,30,20,15,10,0],"title":"WorkspaceRole","description":"A user's role in a workspace. Higher values grant more access."},"InviteType":{"type":"string","enum":["drive","workspace","item"],"title":"InviteType"},"InviteTarget":{"type":"string","enum":["user","anyone"],"title":"InviteTarget"},"DriveInviteDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sent_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"sent_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sent By Id"},"sent_to_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent To Email"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"drive":{"$ref":"#/components/schemas/DriveDTO"},"drive_role":{"$ref":"#/components/schemas/DriveRole"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"workspace":{"$ref":"#/components/schemas/WorkspaceInvitePreviewDTO"},"invite_type":{"$ref":"#/components/schemas/InviteType"},"invite_target":{"$ref":"#/components/schemas/InviteTarget"}},"type":"object","required":["id","sent_by","sent_by_id","sent_to_email","drive_id","drive","drive_role","workspace_id","workspace","invite_type","invite_target"],"title":"DriveInviteDTO"},"DriveDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"icon":{"type":"string","title":"Icon"},"settings":{"$ref":"#/components/schemas/DriveSettings"},"type":{"$ref":"#/components/schemas/DriveType"},"identifier":{"type":"string","title":"Identifier"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"member_inherited_role":{"$ref":"#/components/schemas/DriveRole"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"byos":{"anyOf":[{"$ref":"#/components/schemas/DriveByosData"},{"type":"null"}]},"default_storage_backend":{"anyOf":[{"$ref":"#/components/schemas/DriveDefaultStorageBackend"},{"type":"null"}]}},"type":"object","required":["id","name","description","icon","settings","type","identifier","icon_type","member_inherited_role","invite_id","workspace_id","byos","default_storage_backend"],"title":"DriveDTO"},"DriveSettings":{"properties":{"max_storage_bytes":{"type":"integer","title":"Max Storage Bytes"},"mount_path_macos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Macos"},"mount_path_linux":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Linux"},"mount_path_windows":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Windows"}},"type":"object","required":["max_storage_bytes"],"title":"DriveSettings"},"DriveType":{"type":"string","enum":["catalog","magic","vault"],"title":"DriveType"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"DriveByosData":{"properties":{"bucket":{"type":"string","title":"Bucket"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["bucket","endpoint"],"title":"DriveByosData"},"DriveDefaultStorageBackend":{"properties":{"provider":{"type":"string","title":"Provider"},"bucket":{"type":"string","title":"Bucket"}},"type":"object","required":["provider","bucket"],"title":"DriveDefaultStorageBackend"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/invites/{invite_id}":{"get":{"tags":["members-and-permissions"],"summary":"Gets data for a specific invitation","description":"This is a PUBLIC route where anyone can see invites. To see (you've been invited to ... workspace)","operationId":"getInviteData","parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite ID"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceInviteDTO"},{"$ref":"#/components/schemas/DriveInviteDTO"},{"type":"null"}]}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Accepts invitation

> Allow authenticated users to accept direct or anyone-with-link invites.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"WorkspaceInviteDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sent_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"sent_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sent By Id"},"sent_to_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent To Email"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"workspace":{"$ref":"#/components/schemas/WorkspaceInvitePreviewDTO"},"workspace_role":{"$ref":"#/components/schemas/WorkspaceRole"},"invite_type":{"$ref":"#/components/schemas/InviteType"},"invite_target":{"$ref":"#/components/schemas/InviteTarget"}},"type":"object","required":["id","sent_by","sent_by_id","sent_to_email","workspace_id","workspace","workspace_role","invite_type","invite_target"],"title":"WorkspaceInviteDTO"},"UserDTOBase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"}},"type":"object","required":["id","name","email","avatar_url","user_type"],"title":"UserDTOBase"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"WorkspaceInvitePreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["id","name","domain"],"title":"WorkspaceInvitePreviewDTO"},"WorkspaceRole":{"type":"integer","enum":[60,50,30,20,15,10,0],"title":"WorkspaceRole","description":"A user's role in a workspace. Higher values grant more access."},"InviteType":{"type":"string","enum":["drive","workspace","item"],"title":"InviteType"},"InviteTarget":{"type":"string","enum":["user","anyone"],"title":"InviteTarget"},"DriveInviteDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sent_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"sent_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sent By Id"},"sent_to_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent To Email"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"drive":{"$ref":"#/components/schemas/DriveDTO"},"drive_role":{"$ref":"#/components/schemas/DriveRole"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"workspace":{"$ref":"#/components/schemas/WorkspaceInvitePreviewDTO"},"invite_type":{"$ref":"#/components/schemas/InviteType"},"invite_target":{"$ref":"#/components/schemas/InviteTarget"}},"type":"object","required":["id","sent_by","sent_by_id","sent_to_email","drive_id","drive","drive_role","workspace_id","workspace","invite_type","invite_target"],"title":"DriveInviteDTO"},"DriveDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"icon":{"type":"string","title":"Icon"},"settings":{"$ref":"#/components/schemas/DriveSettings"},"type":{"$ref":"#/components/schemas/DriveType"},"identifier":{"type":"string","title":"Identifier"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"member_inherited_role":{"$ref":"#/components/schemas/DriveRole"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"byos":{"anyOf":[{"$ref":"#/components/schemas/DriveByosData"},{"type":"null"}]},"default_storage_backend":{"anyOf":[{"$ref":"#/components/schemas/DriveDefaultStorageBackend"},{"type":"null"}]}},"type":"object","required":["id","name","description","icon","settings","type","identifier","icon_type","member_inherited_role","invite_id","workspace_id","byos","default_storage_backend"],"title":"DriveDTO"},"DriveSettings":{"properties":{"max_storage_bytes":{"type":"integer","title":"Max Storage Bytes"},"mount_path_macos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Macos"},"mount_path_linux":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Linux"},"mount_path_windows":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mount Path Windows"}},"type":"object","required":["max_storage_bytes"],"title":"DriveSettings"},"DriveType":{"type":"string","enum":["catalog","magic","vault"],"title":"DriveType"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"DriveRole":{"type":"integer","enum":[50,40,30,20,17,15,10,0],"title":"DriveRole","description":"A user's role on a drive, folder, or file. Higher values grant more access."},"DriveByosData":{"properties":{"bucket":{"type":"string","title":"Bucket"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["bucket","endpoint"],"title":"DriveByosData"},"DriveDefaultStorageBackend":{"properties":{"provider":{"type":"string","title":"Provider"},"bucket":{"type":"string","title":"Bucket"}},"type":"object","required":["provider","bucket"],"title":"DriveDefaultStorageBackend"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/invites/{invite_id}/join":{"post":{"tags":["members-and-permissions"],"summary":"Accepts invitation","description":"Allow authenticated users to accept direct or anyone-with-link invites.","operationId":"joinInvite","parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The invite id","description":"The id of the invitation to join"},"description":"The id of the invitation to join"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceInviteDTO"},{"$ref":"#/components/schemas/DriveInviteDTO"},{"type":"null"}]}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PUT /workspaces/{workspace\_id}/users/{user\_id}

> Updates people's permissions on a workspace

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UpdateWorkspacePermissionsRequest":{"properties":{"role":{"$ref":"#/components/schemas/WorkspaceRole","title":"The role to update"}},"type":"object","required":["role"],"title":"UpdateWorkspacePermissionsRequest"},"WorkspaceRole":{"type":"integer","enum":[60,50,30,20,15,10,0],"title":"WorkspaceRole","description":"A user's role in a workspace. Higher values grant more access."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/users/{user_id}":{"put":{"tags":["members-and-permissions"],"summary":"Updates people's permissions on a workspace","operationId":"updateWorkspacePermissions","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The user id to update"},"description":"ID of the user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspacePermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"null"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/{workspace\_id}/users/{user\_id\_to\_remove}

> Removes a user from a workspace

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/users/{user_id_to_remove}":{"delete":{"tags":["members-and-permissions"],"summary":"Removes a user from a workspace","operationId":"removeUserFromWorkspace","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace id","description":"The id of the workspace we want to deactivate the user in"},"description":"The id of the workspace we want to deactivate the user in"},{"name":"user_id_to_remove","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The user id","description":"The id for the user we want to deactivate"},"description":"The id for the user we want to deactivate"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/{workspace\_id}/transfer-ownership/{new\_owner\_user\_id}

> Transfer a workspace to a new owner

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/transfer-ownership/{new_owner_user_id}":{"post":{"tags":["members-and-permissions"],"summary":"Transfer a workspace to a new owner","operationId":"transferWorkspaceOwnership","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."},{"name":"new_owner_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The user to transfer workspace ownership to"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/{workspace\_id}/leave

> Leave a workspace

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/leave":{"post":{"tags":["members-and-permissions"],"summary":"Leave a workspace","operationId":"leaveWorkspace","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get WorkOS Admin Portal link for enterprise SSO/SCIM configuration

> Generate and return a WorkOS Admin Portal link for enterprise configuration.\
> User must be an admin or owner of the workspace and workspace must be on Enterprise plan.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"AdminPortalLinkDTO":{"properties":{"link":{"type":"string","title":"Link"}},"type":"object","required":["link"],"title":"AdminPortalLinkDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/admin-portal-link":{"get":{"tags":["members-and-permissions"],"summary":"Get WorkOS Admin Portal link for enterprise SSO/SCIM configuration","description":"Generate and return a WorkOS Admin Portal link for enterprise configuration.\nUser must be an admin or owner of the workspace and workspace must be on Enterprise plan.","operationId":"getAdminPortalLink","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."},{"name":"intent","in":"query","required":false,"schema":{"enum":["sso","dsync","audit_logs","domain_verification"],"type":"string","description":"The Admin Portal intent (sso, dsync, audit_logs, domain_verification)","default":"sso","title":"Intent"},"description":"The Admin Portal intent (sso, dsync, audit_logs, domain_verification)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPortalLinkDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get a widget token corresponding to the current user and workspace

> Generate and return a WorkOS Widgets token for use with frontend widgets.\
> User must be a member of the workos org.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"members-and-permissions","description":"Invite people to workspaces and drives, change their roles, and grant access\nto individual files and folders. Groups let you manage access for many people\nat once.\n\nRoles are integers, so higher numbers grant more access. See `WorkspaceRole`\nand `DriveRole` in the schemas below for what each value means.\n\nTo check what the current user can do on a file or folder, call\n`GET /workspaces/drives/{drive_id}/file-permissions` or\n`GET /workspaces/drives/{drive_id}/folder-permissions`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"WidgetsTokenDTO":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"WidgetsTokenDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/{workspace_id}/workos-widget":{"get":{"tags":["members-and-permissions"],"summary":"Get a widget token corresponding to the current user and workspace","description":"Generate and return a WorkOS Widgets token for use with frontend widgets.\nUser must be a member of the workos org.","operationId":"getWorkosWidgetToken","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The workspace id"},"description":"ID of the workspace. List yours with `GET /workspaces`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetsTokenDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://academy.shade.inc/developers/workspaces-and-drives/members-and-permissions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
