Update Phone Number Rotation
curl --request PUT \
--url https://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation \
--header 'Content-Type: application/json' \
--data '
{
"daily_cap_override": 2
}
'import requests
url = "https://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation"
payload = { "daily_cap_override": 2 }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({daily_cap_override: 2})
};
fetch('https://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation', 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://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation",
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([
'daily_cap_override' => 2
]),
CURLOPT_HTTPHEADER => [
"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://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation"
payload := strings.NewReader("{\n \"daily_cap_override\": 2\n}")
req, _ := http.NewRequest("PUT", url, payload)
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://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation")
.header("Content-Type", "application/json")
.body("{\n \"daily_cap_override\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"daily_cap_override\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"telephony_configuration_id": 123,
"address": "<string>",
"address_normalized": "<string>",
"address_type": "<string>",
"is_active": true,
"is_default_caller_id": true,
"extra_metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"country_code": "<string>",
"label": "<string>",
"inbound_workflow_id": 123,
"inbound_workflow_name": "<string>",
"rotation_status": "active",
"rotation_status_reason": "<string>",
"rotation_status_changed_at": "2023-11-07T05:31:56Z",
"cooldown_until": "2023-11-07T05:31:56Z",
"daily_cap_override": 123,
"rotation_last_selected_at": "2023-11-07T05:31:56Z",
"rotation_attempts_today": 123,
"daily_cap_ceiling": 123,
"effective_daily_cap_override": 123,
"provider_sync": {
"ok": true,
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Телефония
Пауза и лимит номера для смены номера
Поставить номер на паузу в кампаниях со сменой номера, вернуть его и задать собственный суточный лимит номера
PUT
/
api
/
v1
/
organizations
/
telephony-configs
/
{config_id}
/
phone-numbers
/
{phone_number_id}
/
rotation
Update Phone Number Rotation
curl --request PUT \
--url https://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation \
--header 'Content-Type: application/json' \
--data '
{
"daily_cap_override": 2
}
'import requests
url = "https://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation"
payload = { "daily_cap_override": 2 }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({daily_cap_override: 2})
};
fetch('https://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation', 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://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation",
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([
'daily_cap_override' => 2
]),
CURLOPT_HTTPHEADER => [
"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://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation"
payload := strings.NewReader("{\n \"daily_cap_override\": 2\n}")
req, _ := http.NewRequest("PUT", url, payload)
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://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation")
.header("Content-Type", "application/json")
.body("{\n \"daily_cap_override\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/rotation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"daily_cap_override\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"telephony_configuration_id": 123,
"address": "<string>",
"address_normalized": "<string>",
"address_type": "<string>",
"is_active": true,
"is_default_caller_id": true,
"extra_metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"country_code": "<string>",
"label": "<string>",
"inbound_workflow_id": 123,
"inbound_workflow_name": "<string>",
"rotation_status": "active",
"rotation_status_reason": "<string>",
"rotation_status_changed_at": "2023-11-07T05:31:56Z",
"cooldown_until": "2023-11-07T05:31:56Z",
"daily_cap_override": 123,
"rotation_last_selected_at": "2023-11-07T05:31:56Z",
"rotation_attempts_today": 123,
"daily_cap_ceiling": 123,
"effective_daily_cap_override": 123,
"provider_sync": {
"ok": true,
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Меняет только настройки смены номера. Поле
is_active, входящие звонки и кампании без смены номера остаются без изменений. Отправьте хотя бы одно из полей:
rotation_status—pausedилиactive;daily_cap_override— собственный лимит номера в сутки илиnull, чтобы его убрать. Лимит только понижает лимит кампании и не может быть выше максимума платформы.
rotation_status_reason: "carrier"), снять нельзя: ответ 409 с кодом rotation_carrier_paused. Пауза, поставленная платформой по качеству (auto_health), снимается обычным запросом. Повторная пауза уже приостановленного номера причину не меняет.
Ответ содержит поля rotation_status, rotation_status_reason, rotation_status_changed_at, cooldown_until, daily_cap_override, rotation_last_selected_at и rotation_attempts_today. Те же поля есть в списке номеров.
Частота запросов ограничена на организацию; при превышении ответ 429 с заголовком Retry-After.Body
application/json
Response
Successful Response
Result of pushing a phone-number change to the upstream provider.
Returned alongside create/update responses when the route attempted to
sync inbound webhook configuration. ok=False is a warning, not a
fatal error — the DB write succeeded.
Show child attributes
Show child attributes