Update Pricing Tier
curl --request PATCH \
--url https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"display_name": "<string>",
"overage_rate_usd_per_min": 1,
"platform_fee_usd_per_month": 1,
"included_minutes_per_month": 1,
"concurrent_baseline": 2,
"trial_credit_usd": 1,
"trial_days": 1,
"default_llm_provider": "<string>",
"default_llm_model": "<string>",
"default_stt_provider": "<string>",
"default_tts_provider": "<string>",
"default_tts_model": "<string>",
"is_active": true
}
'import requests
url = "https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}"
payload = {
"reason": "<string>",
"display_name": "<string>",
"overage_rate_usd_per_min": 1,
"platform_fee_usd_per_month": 1,
"included_minutes_per_month": 1,
"concurrent_baseline": 2,
"trial_credit_usd": 1,
"trial_days": 1,
"default_llm_provider": "<string>",
"default_llm_model": "<string>",
"default_stt_provider": "<string>",
"default_tts_provider": "<string>",
"default_tts_model": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reason: '<string>',
display_name: '<string>',
overage_rate_usd_per_min: 1,
platform_fee_usd_per_month: 1,
included_minutes_per_month: 1,
concurrent_baseline: 2,
trial_credit_usd: 1,
trial_days: 1,
default_llm_provider: '<string>',
default_llm_model: '<string>',
default_stt_provider: '<string>',
default_tts_provider: '<string>',
default_tts_model: '<string>',
is_active: true
})
};
fetch('https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}', 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.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reason' => '<string>',
'display_name' => '<string>',
'overage_rate_usd_per_min' => 1,
'platform_fee_usd_per_month' => 1,
'included_minutes_per_month' => 1,
'concurrent_baseline' => 2,
'trial_credit_usd' => 1,
'trial_days' => 1,
'default_llm_provider' => '<string>',
'default_llm_model' => '<string>',
'default_stt_provider' => '<string>',
'default_tts_provider' => '<string>',
'default_tts_model' => '<string>',
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"display_name\": \"<string>\",\n \"overage_rate_usd_per_min\": 1,\n \"platform_fee_usd_per_month\": 1,\n \"included_minutes_per_month\": 1,\n \"concurrent_baseline\": 2,\n \"trial_credit_usd\": 1,\n \"trial_days\": 1,\n \"default_llm_provider\": \"<string>\",\n \"default_llm_model\": \"<string>\",\n \"default_stt_provider\": \"<string>\",\n \"default_tts_provider\": \"<string>\",\n \"default_tts_model\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"display_name\": \"<string>\",\n \"overage_rate_usd_per_min\": 1,\n \"platform_fee_usd_per_month\": 1,\n \"included_minutes_per_month\": 1,\n \"concurrent_baseline\": 2,\n \"trial_credit_usd\": 1,\n \"trial_days\": 1,\n \"default_llm_provider\": \"<string>\",\n \"default_llm_model\": \"<string>\",\n \"default_stt_provider\": \"<string>\",\n \"default_tts_provider\": \"<string>\",\n \"default_tts_model\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"<string>\",\n \"display_name\": \"<string>\",\n \"overage_rate_usd_per_min\": 1,\n \"platform_fee_usd_per_month\": 1,\n \"included_minutes_per_month\": 1,\n \"concurrent_baseline\": 2,\n \"trial_credit_usd\": 1,\n \"trial_days\": 1,\n \"default_llm_provider\": \"<string>\",\n \"default_llm_model\": \"<string>\",\n \"default_stt_provider\": \"<string>\",\n \"default_tts_provider\": \"<string>\",\n \"default_tts_model\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"tier_name": "<string>",
"display_name": "<string>",
"overage_rate_usd_per_min": "<string>",
"platform_fee_usd_per_month": "<string>",
"included_minutes_per_month": 123,
"concurrent_baseline": 123,
"trial_credit_usd": "<string>",
"trial_days": 123,
"default_llm_provider": "<string>",
"default_llm_model": "<string>",
"default_stt_provider": "<string>",
"default_tts_provider": "<string>",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"default_tts_model": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}main
Update Pricing Tier
PATCH
/
api
/
v1
/
admin
/
pricing
/
tiers
/
{tier_name}
Update Pricing Tier
curl --request PATCH \
--url https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"display_name": "<string>",
"overage_rate_usd_per_min": 1,
"platform_fee_usd_per_month": 1,
"included_minutes_per_month": 1,
"concurrent_baseline": 2,
"trial_credit_usd": 1,
"trial_days": 1,
"default_llm_provider": "<string>",
"default_llm_model": "<string>",
"default_stt_provider": "<string>",
"default_tts_provider": "<string>",
"default_tts_model": "<string>",
"is_active": true
}
'import requests
url = "https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}"
payload = {
"reason": "<string>",
"display_name": "<string>",
"overage_rate_usd_per_min": 1,
"platform_fee_usd_per_month": 1,
"included_minutes_per_month": 1,
"concurrent_baseline": 2,
"trial_credit_usd": 1,
"trial_days": 1,
"default_llm_provider": "<string>",
"default_llm_model": "<string>",
"default_stt_provider": "<string>",
"default_tts_provider": "<string>",
"default_tts_model": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reason: '<string>',
display_name: '<string>',
overage_rate_usd_per_min: 1,
platform_fee_usd_per_month: 1,
included_minutes_per_month: 1,
concurrent_baseline: 2,
trial_credit_usd: 1,
trial_days: 1,
default_llm_provider: '<string>',
default_llm_model: '<string>',
default_stt_provider: '<string>',
default_tts_provider: '<string>',
default_tts_model: '<string>',
is_active: true
})
};
fetch('https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}', 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.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reason' => '<string>',
'display_name' => '<string>',
'overage_rate_usd_per_min' => 1,
'platform_fee_usd_per_month' => 1,
'included_minutes_per_month' => 1,
'concurrent_baseline' => 2,
'trial_credit_usd' => 1,
'trial_days' => 1,
'default_llm_provider' => '<string>',
'default_llm_model' => '<string>',
'default_stt_provider' => '<string>',
'default_tts_provider' => '<string>',
'default_tts_model' => '<string>',
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"display_name\": \"<string>\",\n \"overage_rate_usd_per_min\": 1,\n \"platform_fee_usd_per_month\": 1,\n \"included_minutes_per_month\": 1,\n \"concurrent_baseline\": 2,\n \"trial_credit_usd\": 1,\n \"trial_days\": 1,\n \"default_llm_provider\": \"<string>\",\n \"default_llm_model\": \"<string>\",\n \"default_stt_provider\": \"<string>\",\n \"default_tts_provider\": \"<string>\",\n \"default_tts_model\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"display_name\": \"<string>\",\n \"overage_rate_usd_per_min\": 1,\n \"platform_fee_usd_per_month\": 1,\n \"included_minutes_per_month\": 1,\n \"concurrent_baseline\": 2,\n \"trial_credit_usd\": 1,\n \"trial_days\": 1,\n \"default_llm_provider\": \"<string>\",\n \"default_llm_model\": \"<string>\",\n \"default_stt_provider\": \"<string>\",\n \"default_tts_provider\": \"<string>\",\n \"default_tts_model\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/admin/pricing/tiers/{tier_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"<string>\",\n \"display_name\": \"<string>\",\n \"overage_rate_usd_per_min\": 1,\n \"platform_fee_usd_per_month\": 1,\n \"included_minutes_per_month\": 1,\n \"concurrent_baseline\": 2,\n \"trial_credit_usd\": 1,\n \"trial_days\": 1,\n \"default_llm_provider\": \"<string>\",\n \"default_llm_model\": \"<string>\",\n \"default_stt_provider\": \"<string>\",\n \"default_tts_provider\": \"<string>\",\n \"default_tts_model\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"tier_name": "<string>",
"display_name": "<string>",
"overage_rate_usd_per_min": "<string>",
"platform_fee_usd_per_month": "<string>",
"included_minutes_per_month": 123,
"concurrent_baseline": 123,
"trial_credit_usd": "<string>",
"trial_days": 123,
"default_llm_provider": "<string>",
"default_llm_model": "<string>",
"default_stt_provider": "<string>",
"default_tts_provider": "<string>",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"default_tts_model": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Interactive user session: the login JWT, sent as Authorization: Bearer <token>.
Path Parameters
Body
application/json
Partial update on a tier. Every field is optional; only supplied
fields are written. The operator must supply reason so the change
can be audited in pricing_history.
Why this change is being made. Required so the audit trail in pricing_history has context (e.g. 'Q2 review тАФ ElevenLabs raised Turbo v2 by 15%, raising our rate by half').
Required string length:
10 - 500Maximum string length:
64Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 1Required range:
x >= 0Required range:
x >= 0Maximum string length:
32Maximum string length:
64Maximum string length:
32Maximum string length:
32Maximum string length:
64Response
Successful Response
Pricing tier as returned to admin clients.
Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
