> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akua.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get workspace

Returns the details of a workspace.

`GET https://api.akua.dev/v1/workspaces/{id}`

## Authorizations

- `Authorization: Bearer <token>` (BearerAuth): Bearer token for the authenticated caller.

## Path Parameters

- `id` (string, required): Workspace ID. Required string length: `1 - 53`.

## Response

### 200: Workspace details

`application/json`: `Workspace`

- `organization_id` (string, required): ID of the organization that owns this workspace. Required string length: `1 - 54`.
- `id` (string, required): Workspace ID. Required string length: `1 - 53`. Example: `"ws_j572abc123def4"`.
- `name` (string, required): Display name. Example: `"Acme Research"`.
- `slug` (string, required): URL-safe workspace slug.
- `plan` (object, required)
  - `tier` (string, required)
  - `billed_by` (enum<string>, required): Available options: `"platform"`, `"seller"`.
- `workspace_class` (enum<string>, required): Available options: `"standard"`, `"platform"`, `"sandbox"`.
- `lifecycle` (object, required)
  - `state` (enum<string>, required): Lifecycle state of the workspace. `DELETING` means deletion was accepted and the workspace is retained until `purge_at`. Available options: `"ACTIVE"`, `"DELETING"`, `"PURGED"`.
  - `deletion_phase` (enum<string> | null, required): Progress of the accepted deletion request, or null when no deletion has been recorded. Available options: `"ACCEPTED"`, `"RUNNING"`, `"SUCCEEDED"`, `"FAILED"`.
  - `deleted_at` (integer | null, required): When deletion was accepted, or null. Required range: `x >= 0`.
  - `purge_at` (integer | null, required): Scheduled retention expiry that #955 owns as the purge executor, or null. Required range: `x >= 0`.
- `created_at` (integer, required): Unix timestamp (seconds). Required range: `x >= 0`.
- `updated_at` (integer, required): Unix timestamp (seconds). Required range: `x >= 0`.
- `etag` (string, required)

### 401: Missing, invalid or expired credential.

`application/json`: `ApiUnauthorized`

- `_tag` (enum<string>, required): Available options: `"Unauthorized"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 403: The credential may not act in this workspace.

`application/json`: `ApiForbidden`

- `_tag` (enum<string>, required): Available options: `"Forbidden"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 404: The resource was not found in this workspace.

`application/json`: `ApiNotFound`

- `_tag` (enum<string>, required): Available options: `"NotFound"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

## Example request

```bash
curl --request GET \
  --url 'https://api.akua.dev/v1/workspaces/ws_j572abc123def456' \
  --header 'Authorization: Bearer <token>'
```

## Example response

`200` `application/json`

```json
{
  "organization_id": "org_j572abc123def456",
  "id": "ws_j572abc123def4",
  "name": "Acme Research",
  "slug": "<string>",
  "plan": {
    "tier": "<string>",
    "billed_by": "platform"
  },
  "workspace_class": "standard",
  "lifecycle": {
    "state": "ACTIVE",
    "deletion_phase": "ACCEPTED",
    "deleted_at": 123,
    "purge_at": 123
  },
  "created_at": 123,
  "updated_at": 123,
  "etag": "<string>"
}
```
