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

# Create Disposition Group

> Create a new disposition group

## Overview

Create a new group to organize dispositions for specific actions like callbacks or follow-ups.

## Headers

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

## Request Body

<ParamField body="name" type="string" required>
  Group name (max 100 characters)
</ParamField>

<ParamField body="description" type="string">
  Group description (max 1000 characters)
</ParamField>

<ParamField body="dispositions" type="array">
  Array of disposition IDs to include in the group (max 100 items)
</ParamField>

## Response

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

<ResponseField name="message" type="string">
  Response message
</ResponseField>

<ResponseField name="data" type="object">
  Created disposition group object

  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Unique group ID
    </ResponseField>

    <ResponseField name="name" type="string">
      Group name
    </ResponseField>

    <ResponseField name="description" type="string">
      Group description
    </ResponseField>

    <ResponseField name="dispositions" type="array">
      Array of disposition IDs
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      Creation timestamp
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      Last update timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "success": true,
    "message": "Disposition group created successfully",
    "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"
    }
  }
  ```

  ```json 400 Invalid IDs theme={null}
  {
    "success": false,
    "message": "Invalid disposition IDs",
    "invalidIds": ["invalidId123", "invalidId456"]
  }
  ```

  ```json 409 Duplicate theme={null}
  {
    "success": false,
    "message": "Disposition group with name \"Call Back\" already exists"
  }
  ```

  ```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                                 |
| ------ | ------------------------------------------- |
| `400`  | Validation error or invalid disposition IDs |
| `401`  | Unauthorized - Invalid or missing API key   |
| `403`  | Forbidden - Missing required permissions    |
| `409`  | A group with this name already exists       |
| `500`  | Internal server error                       |

## Notes

* Duplicate disposition IDs in the array are automatically removed
* All disposition IDs must belong to your organization
* You can create an empty group (no dispositions) and add them later
