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

# Update Disposition Group

> Update an existing disposition group

## Overview

Update an existing disposition group. Only the fields you provide will be updated; all other fields remain unchanged.

<Note>
  When updating the `dispositions` array, the entire array is replaced. Use the [Add Dispositions](/api-reference/agents/dispositions/add-disposition-in-group) or [Remove Dispositions](/api-reference/agents/dispositions/remove-disposition-from-group) endpoints for incremental changes.
</Note>

## Headers

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

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the disposition group to update
</ParamField>

## Request Body

<ParamField body="name" type="string">
  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 (replaces existing list)
</ParamField>

## Response

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

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

<ResponseField name="updatedFields" type="array">
  List of fields that were updated
</ResponseField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true,
    "message": "Disposition group updated successfully",
    "updatedFields": ["name", "dispositions"]
  }
  ```

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

  ```json 409 Duplicate theme={null}
  {
    "success": false,
    "message": "Disposition group with name \"Callback Required\" 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, no valid fields, or invalid disposition IDs |
| `401`  | Unauthorized - Invalid or missing API key                     |
| `403`  | Forbidden - Missing required permissions                      |
| `404`  | Disposition group not found                                   |
| `409`  | A group with this name already exists                         |
| `500`  | Internal server error                                         |
