Create Disposition
curl --request POST \
--url https://api.agents.timepay.ai/api/v1/dispositions/create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"priority": 123
}
'import requests
url = "https://api.agents.timepay.ai/api/v1/dispositions/create"
payload = {
"name": "<string>",
"description": "<string>",
"priority": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', priority: 123})
};
fetch('https://api.agents.timepay.ai/api/v1/dispositions/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agents.timepay.ai/api/v1/dispositions/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'priority' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agents.timepay.ai/api/v1/dispositions/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agents.timepay.ai/api/v1/dispositions/create")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.timepay.ai/api/v1/dispositions/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}
{
"success": false,
"message": "Validation failed",
"errors": [
"name is required and must be a non-empty string"
]
}
{
"success": false,
"message": "Disposition with name \"Pay in Coming Days/Weeks\" already exists"
}
{
"success": false,
"error": "Unauthorized",
"message": "Missing or invalid authorization header"
}
{
"success": false,
"error": "Forbidden",
"message": "You don't have the required permission to perform this action"
}
{
"success": false,
"error": "InternalServerError",
"message": "An unexpected error occurred"
}
Dispositions
Create Disposition
Create a new disposition for call classification
Create Disposition
curl --request POST \
--url https://api.agents.timepay.ai/api/v1/dispositions/create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"priority": 123
}
'import requests
url = "https://api.agents.timepay.ai/api/v1/dispositions/create"
payload = {
"name": "<string>",
"description": "<string>",
"priority": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', priority: 123})
};
fetch('https://api.agents.timepay.ai/api/v1/dispositions/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agents.timepay.ai/api/v1/dispositions/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'priority' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agents.timepay.ai/api/v1/dispositions/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agents.timepay.ai/api/v1/dispositions/create")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.timepay.ai/api/v1/dispositions/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}
{
"success": false,
"message": "Validation failed",
"errors": [
"name is required and must be a non-empty string"
]
}
{
"success": false,
"message": "Disposition with name \"Pay in Coming Days/Weeks\" already exists"
}
{
"success": false,
"error": "Unauthorized",
"message": "Missing or invalid authorization header"
}
{
"success": false,
"error": "Forbidden",
"message": "You don't have the required permission to perform this action"
}
{
"success": false,
"error": "InternalServerError",
"message": "An unexpected error occurred"
}
Overview
Create a new disposition to classify call outcomes in your campaigns.Headers
string
required
Bearer token for authentication (e.g.,
Bearer <your_token>).string
Optional. Use this header only when the authenticated user belongs to multiple organizations. It identifies the organization to target for this action.
Request Body
string
required
Disposition name (max 100 characters)
string
required
Detailed description of when to use this disposition (max 1000 characters)
integer
default:"500"
Priority level from 0-1000 (0 = highest priority)
Response
boolean
Indicates if the request was successful
string
Response message
object
{
"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"
}
}
{
"success": false,
"message": "Validation failed",
"errors": [
"name is required and must be a non-empty string"
]
}
{
"success": false,
"message": "Disposition with name \"Pay in Coming Days/Weeks\" already exists"
}
{
"success": false,
"error": "Unauthorized",
"message": "Missing or invalid authorization header"
}
{
"success": false,
"error": "Forbidden",
"message": "You don't have the required permission to perform this action"
}
{
"success": false,
"error": "InternalServerError",
"message": "An unexpected error occurred"
}
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 |

