Update Disposition
curl --request PUT \
--url https://api.agents.timepay.ai/api/v1/dispositions/{id} \
--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/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"priority": 123
}
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>', priority: 123})
};
fetch('https://api.agents.timepay.ai/api/v1/dispositions/{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/{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>',
'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/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123\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/{id}")
.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/{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 \"priority\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Disposition updated successfully",
"updatedFields": ["name", "priority"]
}
{
"success": false,
"message": "Validation failed",
"errors": [
"priority must be between 0 and 1000"
]
}
{
"success": false,
"message": "No valid fields provided for update"
}
{
"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,
"message": "Disposition not found"
}
{
"success": false,
"message": "Disposition with name \"Pay in Coming Days\" already exists"
}
{
"success": false,
"error": "InternalServerError",
"message": "An unexpected error occurred"
}
Dispositions
Update Disposition
Update an existing disposition
Update Disposition
curl --request PUT \
--url https://api.agents.timepay.ai/api/v1/dispositions/{id} \
--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/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"priority": 123
}
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>', priority: 123})
};
fetch('https://api.agents.timepay.ai/api/v1/dispositions/{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/{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>',
'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/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123\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/{id}")
.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/{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 \"priority\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Disposition updated successfully",
"updatedFields": ["name", "priority"]
}
{
"success": false,
"message": "Validation failed",
"errors": [
"priority must be between 0 and 1000"
]
}
{
"success": false,
"message": "No valid fields provided for update"
}
{
"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,
"message": "Disposition not found"
}
{
"success": false,
"message": "Disposition with name \"Pay in Coming Days\" already exists"
}
{
"success": false,
"error": "InternalServerError",
"message": "An unexpected error occurred"
}
Overview
Update an existing disposition. Only the fields you provide will be updated; all other fields remain unchanged.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.
Path Parameters
string
required
The unique identifier of the disposition to update
Request Body
string
Disposition name (max 100 characters)
string
Disposition description (max 1000 characters)
integer
Priority level from 0-1000
Response
boolean
Indicates if the request was successful
string
Response message
array
List of fields that were updated
{
"success": true,
"message": "Disposition updated successfully",
"updatedFields": ["name", "priority"]
}
{
"success": false,
"message": "Validation failed",
"errors": [
"priority must be between 0 and 1000"
]
}
{
"success": false,
"message": "No valid fields provided for update"
}
{
"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,
"message": "Disposition not found"
}
{
"success": false,
"message": "Disposition with name \"Pay in Coming Days\" already exists"
}
{
"success": false,
"error": "InternalServerError",
"message": "An unexpected error occurred"
}
Error Codes
| Status | Description |
|---|---|
400 | Validation error or no valid fields provided |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Missing required permissions |
404 | Disposition not found |
409 | A disposition with this name already exists |
500 | Internal server error |

