# Workspaces

## POST /workspaces

> Create Workspace

```json
{"openapi":"3.1.0","info":{"title":"Activeloop Deep Research API","version":"1.0.0"},"servers":[{"url":"https://api.activeloop.ai","description":"Production server"},{"url":"https://api-beta.activeloop.dev","description":"Beta server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)"}},"schemas":{"WorkspaceCreateRequest":{"properties":{"id":{"type":"string","maxLength":34,"minLength":1,"pattern":"^[a-z0-9]+(?:[-_][a-z0-9]+)*$","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"WorkspaceCreateRequest"},"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":{"post":{"summary":"Create Workspace","operationId":"create_workspace_workspaces_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces

> List Workspaces

```json
{"openapi":"3.1.0","info":{"title":"Activeloop Deep Research API","version":"1.0.0"},"servers":[{"url":"https://api.activeloop.ai","description":"Production server"},{"url":"https://api-beta.activeloop.dev","description":"Beta server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)"}},"schemas":{"WorkspaceList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WorkspaceObject"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"WorkspaceList"},"WorkspaceObject":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"creator_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator User Id"},"org_id":{"type":"string","title":"Org Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","name","org_id"],"title":"WorkspaceObject"},"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":{"get":{"summary":"List Workspaces","operationId":"list_workspaces_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/{workspace\_id}

> Get Workspace

```json
{"openapi":"3.1.0","info":{"title":"Activeloop Deep Research API","version":"1.0.0"},"servers":[{"url":"https://api.activeloop.ai","description":"Production server"},{"url":"https://api-beta.activeloop.dev","description":"Beta server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)"}},"schemas":{"WorkspaceObject":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"creator_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator User Id"},"org_id":{"type":"string","title":"Org Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","name","org_id"],"title":"WorkspaceObject"},"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}":{"get":{"summary":"Get Workspace","operationId":"get_workspace_workspaces__workspace_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the workspace to get.","title":"Workspace Id"},"description":"The ID of the workspace to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceObject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/{workspace\_id}

> Delete Workspace

```json
{"openapi":"3.1.0","info":{"title":"Activeloop Deep Research API","version":"1.0.0"},"servers":[{"url":"https://api.activeloop.ai","description":"Production server"},{"url":"https://api-beta.activeloop.dev","description":"Beta server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)"}},"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}":{"delete":{"summary":"Delete Workspace","operationId":"delete_workspace_workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the workspace to delete.","title":"Workspace Id"},"description":"The ID of the workspace to delete."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

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

> Add User To Workspace

```json
{"openapi":"3.1.0","info":{"title":"Activeloop Deep Research API","version":"1.0.0"},"servers":[{"url":"https://api.activeloop.ai","description":"Production server"},{"url":"https://api-beta.activeloop.dev","description":"Beta server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)"}},"schemas":{"WorkspaceAddUserRequest":{"properties":{"user":{"type":"string","title":"User"},"access":{"type":"string","enum":["writer","viewer"],"title":"Access"}},"type":"object","required":["user","access"],"title":"WorkspaceAddUserRequest"},"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":{"post":{"summary":"Add User To Workspace","operationId":"add_user_to_workspace_workspaces__workspace_id__user_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the workspace to add user to.","title":"Workspace Id"},"description":"The ID of the workspace to add user to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceAddUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

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

> Update User In Workspace

```json
{"openapi":"3.1.0","info":{"title":"Activeloop Deep Research API","version":"1.0.0"},"servers":[{"url":"https://api.activeloop.ai","description":"Production server"},{"url":"https://api-beta.activeloop.dev","description":"Beta server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)"}},"schemas":{"WorkspaceUpdateUserRequest":{"properties":{"user":{"type":"string","title":"User"},"access":{"type":"string","enum":["writer","viewer"],"title":"Access"}},"type":"object","required":["user","access"],"title":"WorkspaceUpdateUserRequest"},"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":{"put":{"summary":"Update User In Workspace","operationId":"update_user_in_workspace_workspaces__workspace_id__user_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the workspace to update user info.","title":"Workspace Id"},"description":"The ID of the workspace to update user info."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/{workspace\_id}/user/{user\_id}

> Remove User From Workspace

```json
{"openapi":"3.1.0","info":{"title":"Activeloop Deep Research API","version":"1.0.0"},"servers":[{"url":"https://api.activeloop.ai","description":"Production server"},{"url":"https://api-beta.activeloop.dev","description":"Beta server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)"}},"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}/user/{user_id}":{"delete":{"summary":"Remove User From Workspace","operationId":"remove_user_from_workspace_workspaces__workspace_id__user__user_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the workspace to remove user from.","title":"Workspace Id"},"description":"The ID of the workspace to remove user from."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the user.","title":"User Id"},"description":"The ID of the user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

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

> List Workspace Users

```json
{"openapi":"3.1.0","info":{"title":"Activeloop Deep Research API","version":"1.0.0"},"servers":[{"url":"https://api.activeloop.ai","description":"Production server"},{"url":"https://api-beta.activeloop.dev","description":"Beta server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)"}},"schemas":{"WorkspaceUserList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WorkspaceUser"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"WorkspaceUserList"},"WorkspaceUser":{"properties":{"user_id":{"type":"string","title":"User Id"},"access":{"type":"string","enum":["writer","viewer","owner"],"title":"Access"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["user_id","access","created_at"],"title":"WorkspaceUser"},"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":{"summary":"List Workspace Users","operationId":"list_workspace_users_workspaces__workspace_id__users_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the workspace to list users from.","title":"Workspace Id"},"description":"The ID of the workspace to list users from."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUserList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```
