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

# List Disposition Groups

> Retrieve a paginated list of all disposition groups

## Overview

Retrieve a paginated list of all disposition groups in your organization with optional filtering.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication (e.g., `Bearer <your_token>`).
</ParamField>

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number for pagination
</ParamField>

<ParamField query="search" type="string">
  Search term to filter by name and description
</ParamField>

<ParamField query="expand" type="boolean" default="false">
  If `true`, includes full disposition details for each group
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="array">
  Array of disposition group objects
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination information

  <Expandable title="properties">
    <ResponseField name="page" type="integer">
      Current page number
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Items per page
    </ResponseField>

    <ResponseField name="total" type="integer">
      Total number of items
    </ResponseField>

    <ResponseField name="totalPages" type="integer">
      Total number of pages
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 OK (with expand=true) theme={null}
  {
    "success": true,
    "data": [
      {
        "id": "BQhJQMcijOPZEVhXgova",
        "name": "Call Back",
        "description": "Call customer again if given dispositions are found",
        "dispositions": [
          "qmJFQyVugpOAPjREQeEF",
          "sorlyJWVWKvqzfPFFeuT"
        ],
        "dispositionDetails": [
          {
            "id": "qmJFQyVugpOAPjREQeEF",
            "name": "No Answer",
            "description": "Customer did not pick up",
            "priority": 100
          },
          {
            "id": "sorlyJWVWKvqzfPFFeuT",
            "name": "Busy",
            "description": "Line was busy",
            "priority": 110
          }
        ],
        "createdAt": "2024-11-19T12:32:10",
        "updatedAt": "2024-11-19T12:32:10"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 50,
      "total": 5,
      "totalPages": 1
    }
  }
  ```

  ```json 200 OK (without expand) theme={null}
  {
    "success": true,
    "data": [
      {
        "id": "BQhJQMcijOPZEVhXgova",
        "name": "Call Back",
        "description": "Call customer again if given dispositions are found",
        "dispositions": [
          "qmJFQyVugpOAPjREQeEF",
          "sorlyJWVWKvqzfPFFeuT"
        ],
        "createdAt": "2024-11-19T12:32:10",
        "updatedAt": "2024-11-19T12:32:10"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 50,
      "total": 5,
      "totalPages": 1
    }
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "success": false,
    "error": "Unauthorized",
    "message": "Missing or invalid authorization header"
  }
  ```

  ```json 403 Forbidden theme={null}
  {
    "success": false,
    "error": "Forbidden",
    "message": "You don't have the required permission to perform this action"
  }
  ```

  ```json 500 Server Error theme={null}
  {
    "success": false,
    "error": "InternalServerError",
    "message": "An unexpected error occurred"
  }
  ```
</ResponseExample>

## Error Codes

| Status | Description                               |
| ------ | ----------------------------------------- |
| `401`  | Unauthorized - Invalid or missing API key |
| `403`  | Forbidden - Missing required permissions  |
| `500`  | Internal server error                     |

## Using the Expand Parameter

When `expand=true`, each group includes a `dispositionDetails` array with full information about each disposition in the group. This is useful when you need to display disposition names and properties without making additional API calls.

<Note>
  Using `expand=true` may increase response time for groups with many dispositions. Use it only when you need the full disposition details.
</Note>
