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

# ワークスペース取得

> APIキーに関連付けられたワークスペースの詳細を取得します

## 概要

このエンドポイントは、提供されたAPIキーが属するワークスペースの詳細情報を返します。ワークスペース名、作成日、設定などの基本的なメタデータが含まれます。

## 認証

すべてのAPIリクエストは `Authorization: Bearer <API_KEY>` で認証します。

<ParamField header="Authorization" type="string" required>
  Bearerトークン。形式: `Bearer <API_KEY>`。
</ParamField>

## レスポンス

<ResponseField name="workspace" type="object">
  ワークスペースオブジェクト。

  <Expandable title="properties">
    <ResponseField name="id" type="string">
      ワークスペースの一意識別子。
    </ResponseField>

    <ResponseField name="name" type="string">
      ワークスペース名。
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ワークスペースが作成されたISO8601タイムスタンプ。
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      ワークスペースが最後に更新されたISO8601タイムスタンプ。
    </ResponseField>

    <ResponseField name="settings" type="object">
      ワークスペース設定。

      <Expandable title="properties">
        <ResponseField name="rag_corpus_id" type="string">
          ワークスペースに関連付けられたRAGコーパスID。
        </ResponseField>

        <ResponseField name="company" type="object">
          会社情報。

          <Expandable title="properties">
            <ResponseField name="name" type="string">
              会社名。
            </ResponseField>

            <ResponseField name="url" type="string">
              会社ウェブサイトURL。
            </ResponseField>

            <ResponseField name="info" type="string">
              会社の説明または情報。
            </ResponseField>

            <ResponseField name="headcount" type="string">
              会社の従業員数範囲。
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="keyterms" type="string[]">
          ワークスペースの主要用語リスト。
        </ResponseField>

        <ResponseField name="audio_location" type="string">
          音声ファイルの保存場所。`none`、`local`、`aside-server`、`custom-server`のいずれか。
        </ResponseField>

        <ResponseField name="purge_period" type="string">
          データ保持期間（日数）。`NONE`、`7`、`30`、`90`、`180`、`365`のいずれか。
        </ResponseField>

        <ResponseField name="meeting_default_permission" type="string">
          新しいミーティングのデフォルト権限。`public`、`workspace`、`only-me`のいずれか。
        </ResponseField>

        <ResponseField name="member_meeting_visibility" type="string">
          メンバーミーティングの可視性。`only-me`、`workspace-read`、`workspace-write`のいずれか。
        </ResponseField>

        <ResponseField name="mask_sensitive_info" type="boolean">
          文字起こしで機密情報をマスクするかどうか。
        </ResponseField>

        <ResponseField name="auto_public_on_share" type="boolean">
          共有時にミーティングを自動的に公開するかどうか。
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="allowedEmailDomains" type="string[] | null">
      ワークスペースへのアクセスが許可されたメールドメインのリスト。
    </ResponseField>

    <ResponseField name="iconUrl" type="string | null">
      ワークスペースアイコンURL。
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash curl theme={null}

  curl -X GET "https://api.caret.so/v1/workspace" \
       -H "Authorization: Bearer your_api_key_here"

  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.caret.so/v1/workspace', {
    headers: {
      Authorization: 'Bearer your_api_key_here',
    },
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.caret.so/v1/workspace"
  headers = {
      "Authorization": "Bearer your_api_key_here"
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "workspace": {
      "id": "ws_123456789",
      "name": "Acme Corp",
      "createdAt": "2023-01-01T00:00:00Z",
      "updatedAt": "2023-01-01T00:00:00Z",
      "settings": {
        "keyterms": ["technical", "documentation"],
        "audio_location": "aside-server",
        "meeting_default_permission": "workspace"
      },
      "allowedEmailDomains": ["acme.com"],
      "iconUrl": "https://example.com/icon.png"
    }
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "error": {
      "code": "unauthorized",
      "message": "Invalid or missing API key"
    }
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "error": {
      "code": "internal_server_error",
      "message": "An unexpected error occurred"
    }
  }
  ```
</ResponseExample>
