# Workspace

This file outlines the Flashback API's workspace management features, including creating, updating, listing, and managing workspaces that group users and resources within an organization. Workspaces support role-based access control with READ, WRITE, and ADMIN permissions.

{% hint style="info" %}
To perform these operations, you must be authenticated by means of one of the following methods: [BearerAuth](https://docs.flashback.tech/support-reference/platform-api-reference/..#http-bearer-authentication).
{% endhint %}

## Workspace API Calls <a href="#flashback-api-workspaces" id="flashback-api-workspaces"></a>

| Method                                                                   | API Reference                                                                                                                                                           | Description                                                       |
| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| <mark style="color:orange;">`POST`</mark>`/workspace`                    | [**post\_\_workspace**](https://docs.flashback.tech/support-reference/platform-api-reference/workspace/post__workspace)                                                 | Create a new workspace for the authenticated user's organization. |
| <mark style="color:green;">`GET`</mark>`/workspace`                      | [**get\_\_workspace**](https://docs.flashback.tech/support-reference/platform-api-reference/workspace/get__workspace)                                                   | Retrieve all workspaces the authenticated user can access.        |
| <mark style="color:green;">`GET`</mark>`/workspace/{id}`                 | [**get\_\_workspace\_workspaceid**](https://docs.flashback.tech/support-reference/platform-api-reference/workspace/get__workspace_-workspaceid)                         | Retrieve a specific workspace by ID.                              |
| <mark style="color:purple;">`PUT`</mark>`/workspace/{id}`                | [**put\_\_workspace\_workspaceid**](https://docs.flashback.tech/support-reference/platform-api-reference/workspace/put__workspace_-workspaceid)                         | Update an existing workspace's configuration.                     |
| <mark style="color:red;">`DELETE`</mark>`/workspace/{id}`                | [**delete\_\_workspace\_workspaceid**](https://docs.flashback.tech/support-reference/platform-api-reference/workspace/delete__workspace_-workspaceid)                   | Delete a workspace (soft delete).                                 |
| <mark style="color:orange;">`POST`</mark>`/workspace/{id}/users`         | [**post\_\_workspace\_wksid\_users**](https://docs.flashback.tech/support-reference/platform-api-reference/workspace/post__workspace_-wksid-_users)                     | Add a user to a workspace with specified role.                    |
| <mark style="color:purple;">`PUT`</mark>`/workspace/{id}/users/{userId}` | [**put\_\_workspace\_wksid\_users\_userid**](https://docs.flashback.tech/support-reference/platform-api-reference/workspace/put__workspace_-wksid-_users_-userid)       | Update a user's role in a workspace.                              |
| <mark style="color:red;">`DELETE`</mark>`/workspace/{id}/users/{userId}` | [**delete\_\_workspace\_wksid\_users\_userid**](https://docs.flashback.tech/support-reference/platform-api-reference/workspace/delete__workspace_-wksid-_users_-userid) | Remove a user from a workspace.                                   |

## Workspace Access Types

| Access Type | Description                                          |
| ----------- | ---------------------------------------------------- |
| `READ`      | Read-only access to workspace resources              |
| `WRITE`     | Read and write access to workspace resources         |
| `ADMIN`     | Full administrative access including user management |

## Workspace Management Permissions

* **Organization Owners, Administrators, and Workspace Managers** can create new workspaces
* **Workspace Admins** can manage workspace users and update workspace settings
* **Workspace Admins** can delete workspaces (only if they contain no buckets or repositories)
* Users must have validated accounts to perform workspace operations
