> ## Documentation Index
> Fetch the complete documentation index at: https://velt-mintlify-e6426361.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Workspace

> Retrieve details of an existing Velt workspace using the v2 REST API, including workspace metadata, owner info, plan, and configuration summary.

Use this API to retrieve details of an existing Velt workspace.

<Info>
  This endpoint uses **workspace-level auth**: pass `x-velt-workspace-id` and `x-velt-workspace-auth-token` (from the Create Workspace response) as headers.
</Info>

# Endpoint

`POST https://api.velt.dev/v2/workspace/get`

# Headers

<ParamField header="x-velt-workspace-id" type="string" required>
  Your workspace ID.
</ParamField>

<ParamField header="x-velt-workspace-auth-token" type="string" required>
  Your workspace [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  Empty data object.
</ParamField>

# Example Request

```JSON theme={null}
{
  "data": {}
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Workspace retrieved successfully",
    "data": {
      "id": "workspace_abc123",
      "name": "My Workspace",
      "owner": {
        "email": "owner@example.com",
        "id": "owner_id_123",
        "name": "John Doe",
        "avatar": "https://example.com/avatar.png"
      },
      "authToken": "9a1b2c3d4e5f60718293a4b5c6d7e8f9",
      "apiKeyList": {
        "velt_api_key_1": {
          "apiKeyName": "Owner Test API Key",
          "id": "velt_api_key_1",
          "type": "testing"
        }
      }
    }
  }
}
```

<Note>
  `apiKeyList` is a **keyed object** (not an array). Each key is the API key ID. To extract the first API key, use `Object.keys(result.data.apiKeyList)[0]` in JavaScript or iterate over the object keys.
</Note>

#### Failure Response

##### If workspace not found

```JSON theme={null}
{
  "error": {
    "status": "NOT_FOUND",
    "message": "Workspace not found."
  }
}
```

##### If the workspace ID header is missing

```JSON theme={null}
{
  "error": {
    "status": "INVALID_ARGUMENT",
    "message": "Workspace ID not found in headers."
  }
}
```

##### If the auth token header is missing

```JSON theme={null}
{
  "error": {
    "status": "INVALID_ARGUMENT",
    "message": "Auth Token not found in headers."
  }
}
```

##### If the auth token is invalid

```JSON theme={null}
{
  "error": {
    "status": "UNAUTHENTICATED",
    "message": "Invalid auth token for workspace."
  }
}
```

##### If rate limit exceeded

```JSON theme={null}
{
  "error": {
    "status": "RESOURCE_EXHAUSTED",
    "message": "Rate limit exceeded. Try again after 1 minute."
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Workspace retrieved successfully",
      "data": {
        "id": "workspace_abc123",
        "name": "My Workspace",
        "owner": {
          "email": "owner@example.com",
          "id": "owner_id_123",
          "name": "John Doe",
          "avatar": "https://example.com/avatar.png"
        },
        "authToken": "9a1b2c3d4e5f60718293a4b5c6d7e8f9",
        "apiKeyList": {
          "velt_api_key_1": {
            "apiKeyName": "Owner Test API Key",
            "id": "velt_api_key_1",
            "type": "testing"
          }
        }
      }
    }
  }
  ```
</ResponseExample>
