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

# Get Workspace

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-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-auth-token" type="string" required>
  Your [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": ""
      },
      "authToken": "eyJhbGciOiJSUzI1NiIs...",
      "apiKeyList": {
        "velt_api_key_1": {
          "apiKeyName": "John Doe 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."
  }
}
```

<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": ""
        },
        "authToken": "eyJhbGciOiJSUzI1NiIs...",
        "apiKeyList": {
          "velt_api_key_1": {
            "apiKeyName": "John Doe Test API Key",
            "id": "velt_api_key_1",
            "type": "testing"
          }
        }
      }
    }
  }
  ```
</ResponseExample>
