Create Disposition Group
curl --request POST \
--url https://api.agents.timepay.ai/api/v1/dispositions/groups/create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"dispositions": [
{}
]
}
'import requests
url = "https://api.agents.timepay.ai/api/v1/dispositions/groups/create"
payload = {
"name": "<string>",
"description": "<string>",
"dispositions": [{}]
}
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>', dispositions: [{}]})
};
fetch('https://api.agents.timepay.ai/api/v1/dispositions/groups/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/groups/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>',
'dispositions' => [
[
]
]
]),
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/groups/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"dispositions\": [\n {}\n ]\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/groups/create")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"dispositions\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.timepay.ai/api/v1/dispositions/groups/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 \"dispositions\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}
{
"success": false,
"message": "Invalid disposition IDs",
"invalidIds": ["invalidId123", "invalidId456"]
}
{
"success": false,
"message": "Disposition group with name \"Call Back\" 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 Group
Create Disposition Group
Create a new disposition group
Create Disposition Group
curl --request POST \
--url https://api.agents.timepay.ai/api/v1/dispositions/groups/create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"dispositions": [
{}
]
}
'import requests
url = "https://api.agents.timepay.ai/api/v1/dispositions/groups/create"
payload = {
"name": "<string>",
"description": "<string>",
"dispositions": [{}]
}
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>', dispositions: [{}]})
};
fetch('https://api.agents.timepay.ai/api/v1/dispositions/groups/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/groups/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>',
'dispositions' => [
[
]
]
]),
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/groups/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"dispositions\": [\n {}\n ]\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/groups/create")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"dispositions\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agents.timepay.ai/api/v1/dispositions/groups/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 \"dispositions\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}
{
"success": false,
"message": "Invalid disposition IDs",
"invalidIds": ["invalidId123", "invalidId456"]
}
{
"success": false,
"message": "Disposition group with name \"Call Back\" 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 group to organize dispositions for specific actions like callbacks or follow-ups.Headers
string
required
Bearer token for authentication (e.g.,
Bearer <your_token>).Request Body
string
required
Group name (max 100 characters)
string
Group description (max 1000 characters)
array
Array of disposition IDs to include in the group (max 100 items)
Response
boolean
Indicates if the request was successful
string
Response message
object
{
"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"
}
}
{
"success": false,
"message": "Invalid disposition IDs",
"invalidIds": ["invalidId123", "invalidId456"]
}
{
"success": false,
"message": "Disposition group with name \"Call Back\" 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 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

