> ## 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.

# メンバー一覧取得

> ワークスペースメンバーのページネーションされた一覧を取得します

## 概要

このエンドポイントは、ワークスペースメンバーのページネーションされた一覧を返します。`search`パラメータを使用して、名前またはメールで結果をフィルタリングできます。

## 認証

すべてのAPIリクエストは `Authorization: Bearer <API_KEY>` で認証します。このエンドポイントには`users`スコープが必要です。

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

## クエリパラメータ

<ParamField query="limit" type="string" default="10">
  ページあたりのアイテム数。
</ParamField>

<ParamField query="offset" type="string" default="0">
  開始位置。
</ParamField>

<ParamField query="search" type="string">
  名前またはメールで検索。
</ParamField>

## レスポンス

<ResponseField name="items" type="object[]">
  ワークスペースメンバーのリスト。

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

    <ResponseField name="name" type="string">
      ユーザー名。
    </ResponseField>

    <ResponseField name="email" type="string">
      ユーザーメール。
    </ResponseField>

    <ResponseField name="profileUrl" type="string | null">
      プロフィール画像URL。
    </ResponseField>

    <ResponseField name="role" type="string">
      ワークスペースでのユーザーの役割。
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ユーザーが参加したISO8601タイムスタンプ。
    </ResponseField>

    <ResponseField name="folders" type="object[]">
      ユーザーフォルダ。

      <Expandable title="properties">
        <ResponseField name="id" type="string">
          フォルダID。
        </ResponseField>

        <ResponseField name="name" type="string">
          フォルダ名。
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  ページネーションメタデータ。

  <Expandable title="properties">
    <ResponseField name="limit" type="number">
      ページあたりのアイテム数。
    </ResponseField>

    <ResponseField name="offset" type="number">
      開始位置。
    </ResponseField>

    <ResponseField name="total" type="number">
      アイテムの総数。
    </ResponseField>
  </Expandable>
</ResponseField>

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

  curl -X GET "https://api.caret.so/v1/workspace/members?limit=10&offset=0" \
       -H "Authorization: Bearer your_api_key_here"

  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.caret.so/v1/workspace/members?limit=10&offset=0',
    {
      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/members"
  params = {
      "limit": "10",
      "offset": "0"
  }
  headers = {
      "Authorization": "Bearer your_api_key_here"
  }

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

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "items": [
      {
        "id": "user_123456789",
        "name": "John Doe",
        "email": "john@example.com",
        "profileUrl": "https://example.com/profile.jpg",
        "role": "admin",
        "createdAt": "2023-01-01T00:00:00Z",
        "folders": [
          {
            "id": "folder_123",
            "name": "Product"
          }
        ]
      }
    ],
    "pagination": {
      "limit": 10,
      "offset": 0,
      "total": 1
    }
  }
  ```

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

  ```json 403 Forbidden theme={null}
  {
    "error": {
      "code": "forbidden",
      "message": "Missing required scope: users"
    }
  }
  ```
</ResponseExample>
