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

> Create a new disposition for call classification

## Overview

Create a new disposition to classify call outcomes in your campaigns.

## 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>
  Disposition name (max 100 characters)
</ParamField>

<ParamField body="description" type="string">
  Detailed description of when to use this disposition (max 1000 characters)
</ParamField>

<ParamField body="priority" type="integer" default="500">
  Priority level from 0-1000 (0 = highest priority)
</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 object

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

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

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

    <ResponseField name="priority" type="integer">
      Priority level
    </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 created successfully",
    "data": {
      "id": "NiciJNJoGytGUGiyhqgK",
      "name": "Pay in Coming Days/Weeks",
      "description": "Mark if customer says they will pay next day or after few days.",
      "priority": 0,
      "createdAt": "2025-02-06T09:02:03",
      "updatedAt": "2025-02-06T09:02:03"
    }
  }
  ```

  ```json 400 Validation Error theme={null}
  {
    "success": false,
    "message": "Validation failed",
    "errors": [
      "name is required and must be a non-empty string"
    ]
  }
  ```

  ```json 409 Duplicate theme={null}
  {
    "success": false,
    "message": "Disposition with name \"Pay in Coming Days/Weeks\" 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 - check the `errors` array for details |
| `401`  | Unauthorized - Invalid or missing API key               |
| `403`  | Forbidden - Missing required permissions                |
| `409`  | A disposition with this name already exists             |
| `500`  | Internal server error                                   |
