curl --request PATCH \
--url https://app.thinnest.ai/api/v1/phone-numbers/{number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Front desk",
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"callingAgent": "ag_9b0e4d17-5a2c-4e6f-b381-7c4d2a0f9e15"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Front desk',
agent: 'ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34',
callingAgent: 'ag_9b0e4d17-5a2c-4e6f-b381-7c4d2a0f9e15'
})
};
fetch('https://app.thinnest.ai/api/v1/phone-numbers/{number}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/phone-numbers/{number}"
payload = {
"label": "Front desk",
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"callingAgent": "ag_9b0e4d17-5a2c-4e6f-b381-7c4d2a0f9e15"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Update Phone Number
Points a number at an agent, lends it to one for calling out, names it, or forwards its calls — any of the four. agent makes the number that agent’s line (it stops being any other agent’s; the agent must have voice switched on); callingAgent lets an agent call out on it without answering it (a brought number needs its carrier account’s keys saved first); forwardTo sends every call to another phone, and works whether or not an agent answers the number (in the console: Numbers page, the number’s menu, Forward calls). They are applied in the order label, agent, callingAgent, forwardTo, and a refusal stops there with the earlier changes kept. Needs a full key.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/phone-numbers/{number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Front desk",
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"callingAgent": "ag_9b0e4d17-5a2c-4e6f-b381-7c4d2a0f9e15"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Front desk',
agent: 'ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34',
callingAgent: 'ag_9b0e4d17-5a2c-4e6f-b381-7c4d2a0f9e15'
})
};
fetch('https://app.thinnest.ai/api/v1/phone-numbers/{number}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/phone-numbers/{number}"
payload = {
"label": "Front desk",
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"callingAgent": "ag_9b0e4d17-5a2c-4e6f-b381-7c4d2a0f9e15"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Authorizations
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Path Parameters
Body
Send any of the four; at least one.
Forward every call to this number to this phone (E.164, like +919812345678) without the agent answering — a fallback for when the agent is not working. It rings for 30 seconds. If nobody picks up, a caller on a number from us, Plivo or Twilio hears that nobody could take the call; a caller on a number brought from Telnyx gets no spoken message — the line rings out or returns busy, then ends. A call that is picked up is cut off at its limit: on a number rented here, when the balance can no longer pay for it and never later than 20 minutes (the platform's maximum call length); on a number you brought, after 30 minutes. Premium-rate, shared-cost, toll-free, satellite and some high-cost international destinations are refused (forward_destination_not_allowed, 422). It works whether or not an agent answers the number: with an agent, the forward replaces it; with none (never attached, deleted, or its voice switched off) the forward answers the call itself, so the number never goes quiet. A workspace that cannot pay for a call, or has no free call line, does not forward - the caller hears that the number is not answering. Billed like a call put through to a person: every connected minute on a number rented here (at the voice plan of the agent attached to the number, or the Premium plan when no agent is; under your own keys, the flat own-key price of that set), nothing on a number you brought. A forwarded call is not recorded. Cannot be this number or another number on the platform. null stops forwarding.
"+919812345678"
Response
The number as it now is.
A number, with the agent it is lent to for calling out.