Update Disposition Group
curl --request PUT \
--url https://api.agents.timepay.ai/api/v1/dispositions/groups/{id} \
--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/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"dispositions": [{}]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"dispositions\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.agents.timepay.ai/api/v1/dispositions/groups/{id}")
.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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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 updated successfully",
"updatedFields": ["name", "dispositions"]
}
{
"success": false,
"message": "Invalid disposition IDs",
"invalidIds": ["invalidId123"]
}
{
"success": false,
"message": "Disposition group with name \"Callback Required\" 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
Update Disposition Group
Update an existing disposition group
Update Disposition Group
curl --request PUT \
--url https://api.agents.timepay.ai/api/v1/dispositions/groups/{id} \
--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/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"dispositions": [{}]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"dispositions\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.agents.timepay.ai/api/v1/dispositions/groups/{id}")
.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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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 updated successfully",
"updatedFields": ["name", "dispositions"]
}
{
"success": false,
"message": "Invalid disposition IDs",
"invalidIds": ["invalidId123"]
}
{
"success": false,
"message": "Disposition group with name \"Callback Required\" 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
Update an existing disposition group. Only the fields you provide will be updated; all other fields remain unchanged.When updating the
dispositions array, the entire array is replaced. Use the Add Dispositions or Remove Dispositions endpoints for incremental changes.Headers
string
required
Bearer token for authentication (e.g.,
Bearer <your_token>).Path Parameters
string
required
The unique identifier of the disposition group to update
Request Body
string
Group name (max 100 characters)
string
Group description (max 1000 characters)
array
Array of disposition IDs (replaces existing list)
Response
boolean
Indicates if the request was successful
string
Response message
array
List of fields that were updated
{
"success": true,
"message": "Disposition group updated successfully",
"updatedFields": ["name", "dispositions"]
}
{
"success": false,
"message": "Invalid disposition IDs",
"invalidIds": ["invalidId123"]
}
{
"success": false,
"message": "Disposition group with name \"Callback Required\" 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, 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 |

