Calling Add-on Slots
curl --request GET \
--url https://app.tuco.ai/api/lines/calling-addon-slots \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/lines/calling-addon-slots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.tuco.ai/api/lines/calling-addon-slots', 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.tuco.ai/api/lines/calling-addon-slots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.tuco.ai/api/lines/calling-addon-slots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.tuco.ai/api/lines/calling-addon-slots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/lines/calling-addon-slots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"paid": 123,
"held": 123,
"free": 123
}Lines & Leads
Calling Add-on Slots
How many calling add-ons your workspace pays for, how many lines use them, and how many are free for the next phone line at no new charge.
GET
/
api
/
lines
/
calling-addon-slots
Calling Add-on Slots
curl --request GET \
--url https://app.tuco.ai/api/lines/calling-addon-slots \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/lines/calling-addon-slots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.tuco.ai/api/lines/calling-addon-slots', 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.tuco.ai/api/lines/calling-addon-slots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.tuco.ai/api/lines/calling-addon-slots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.tuco.ai/api/lines/calling-addon-slots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/lines/calling-addon-slots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"paid": 123,
"held": 123,
"free": 123
}Read-only. Use a workspace API key (
tuco_…).curl https://app.tuco.ai/api/lines/calling-addon-slots \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
{
"slots": {
"facetime_audio": { "paid": 2, "held": 1, "free": 1 },
"caller_id_registration": { "paid": 0, "held": 0, "free": 0 }
}
}
facetime_audio, caller_id_registration):
number
Slots of this add-on on the workspace’s subscription.
number
Lines that have this add-on (awaiting payment, setting up, or active).
number
paid minus held, never below 0. More than 0 means the next phone line gets this add-on
automatically with no new charge, and adding it to an existing line with
POST /api/lines/{id}/calling-addons costs nothing.0 for everything.
The same number is on each add-on in
GET /api/lines/{id}/calling-addons as prepaidFree.
Error responses
| Status | When |
|---|---|
401 | Missing or invalid key |
403 | An agency key (tucoagency_…) was used |
502 | "Could not read add-on slots." Billing couldn’t be read. Try again |