curl --request GET \
--url https://app.thinnest.ai/api/v1/phone-numbers/available \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/phone-numbers/available', 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/available"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"number": "918041234567",
"city": "Bangalore",
"monthlyPrice": {
"amountMinor": 34900,
"currency": "INR"
}
},
{
"number": "918041239876",
"city": "Bangalore",
"monthlyPrice": {
"amountMinor": 34900,
"currency": "INR"
}
}
],
"nextCursor": "20"
}{
"error": "`pattern` must be up to ten digits, like an area code: 80."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "Phone numbers need a paid plan. Switch to pay-as-you-go — there is no monthly fee — and top up, because a number is charged every month."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}{
"error": "We could not reach the numbering system just now. Try again in a few minutes."
}Search Available Phone Numbers
Indian local numbers you can rent, each with its monthly rent at your plan’s rate in your balance’s currency. Numbers somebody already holds are left out, so a page (up to twenty) can hold fewer and still have more after it: pass nextCursor back as cursor. Needs a paid plan.
curl --request GET \
--url https://app.thinnest.ai/api/v1/phone-numbers/available \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/phone-numbers/available', 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/available"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"number": "918041234567",
"city": "Bangalore",
"monthlyPrice": {
"amountMinor": 34900,
"currency": "INR"
}
},
{
"number": "918041239876",
"city": "Bangalore",
"monthlyPrice": {
"amountMinor": 34900,
"currency": "INR"
}
}
],
"nextCursor": "20"
}{
"error": "`pattern` must be up to ten digits, like an area code: 80."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "Phone numbers need a paid plan. Switch to pay-as-you-go — there is no monthly fee — and top up, because a number is charged every month."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}{
"error": "We could not reach the numbering system just now. Try again in a few minutes."
}Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
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.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Query Parameters
Up to ten digits that follow the country code — an area code, such as 80 for Bengaluru.
^\d{1,10}$A city, spelled exactly as List Available Cities lists it.
60The nextCursor from the page before. Leave it out for the first page.
^\d+$