# Workspaces

> A Workspace is the primary organizational boundary. It acts as a secure sandbox reflecting a single client, department, or folder ecosystem.

A **Workspace** is the primary organizational boundary in the platform. It acts as a secure sandbox reflecting a single client, department, or folder ecosystem.

* **Absolute Isolation**: a workspace contains its Documents, Jobs, API keys and Credits. Cross-workspace access is impossible by design.
* **API Scopes**: a workspace key can never locate or influence data from another workspace.

***

## 🛠️ Workspace Management

Workspaces support standard lifecycle operations. For a detailed technical reference of every field and parameter, see the [**Workspace reference**](https://docs.axelered.com/reference#workspace).

### Your Workspace

A workspace-scoped key always acts on its own workspace, which it can [read](https://docs.axelered.com/reference/workspace/api_read_current_workspace_get) and [rename](https://docs.axelered.com/reference/workspace/api_update_current_workspace_patch) at `/workspace`.

```bash
curl "https://api.axelered.com/v1/workspace" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

The lifecycle operations below live under `/admin` and need a server-scoped key.

### [Create a Workspace](https://docs.axelered.com/reference/admin/api_create_admin_workspaces_post)

Initializing a workspace is typically the first step in any integration.

```bash
curl -X POST "https://api.axelered.com/v1/admin/workspaces" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Core"
  }'
```

### Read, List & Update

To manage your existing environments, use the following specialized endpoints:

* [**List Workspaces**](https://docs.axelered.com/reference/admin/api_list_admin_workspaces_get): Retrieve all active workspaces accessible by your key.
* [**Read Workspace**](https://docs.axelered.com/reference/admin/api_read_admin_workspaces__workspace_id__get): Fetch the metadata of a specific workspace.
* [**Update Workspace**](https://docs.axelered.com/reference/admin/api_update_admin_workspaces__workspace_id__patch): Change the name of a workspace.

### [Delete a Workspace](https://docs.axelered.com/reference/admin/api_delete_admin_workspaces__workspace_id__delete)

Workspaces use **soft-deletion**. When deleted, they are hidden from listings, but their data is preserved and can be [restored](https://docs.axelered.com/reference/admin/api_undelete_admin_workspaces__workspace_id__undelete_put) if necessary.

```bash
curl -X DELETE "https://api.axelered.com/v1/admin/workspaces/{workspace_id}" \
  -H "Authorization: Bearer YOUR_API_KEY"
```
