Line Plan Limits
curl --request GET \
--url https://app.tuco.ai/api/lines/limits \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/lines/limits"
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/limits', 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/limits",
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/limits"
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/limits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/lines/limits")
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{
"plan": {},
"planName": "<string>",
"limits": {},
"addons": {},
"current": {},
"canCreatePhone": true,
"canCreateEmail": true,
"error": "<string>"
}Lines & Leads
Line Plan Limits
Read how many phone and email lines your plan allows, how many you already have, and whether another one can be created. Pre-flight for POST /api/line-requests.
GET
/
api
/
lines
/
limits
Line Plan Limits
curl --request GET \
--url https://app.tuco.ai/api/lines/limits \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/lines/limits"
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/limits', 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/limits",
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/limits"
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/limits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/lines/limits")
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{
"plan": {},
"planName": "<string>",
"limits": {},
"addons": {},
"current": {},
"canCreatePhone": true,
"canCreateEmail": true,
"error": "<string>"
}Call this before
POST /api/line-requests to
know whether a new line is included, needs payment, or is not allowed at all on the current plan.Authentication
Pass your workspace API key as a Bearer token, or use a Clerk session token.Authorization: Bearer tuco_xxxxxxxxxxxxx
Example
curl "https://app.tuco.ai/api/lines/limits" \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
Success (200 OK)
{
"plan": "starter",
"planName": "Starter",
"limits": {
"maxPhoneLines": 1,
"maxEmailLines": 0,
"maxPhoneAddons": 0,
"maxEmailAddons": -1,
"effectiveMaxPhoneLines": 1,
"effectiveMaxEmailLines": 0
},
"addons": {
"currentPhoneAddonQuantity": 0,
"currentEmailAddonQuantity": 0,
"remainingPurchasablePhoneAddons": 0,
"remainingPurchasableEmailAddons": -1
},
"current": { "phoneLines": 1, "emailLines": 1 },
"canCreatePhone": false,
"canCreateEmail": true
}
-1 means unlimited, not zero. Check for -1 before comparing a count against a limit.Response
string | null
Plan id, e.g.
starter. null when there is no active subscription.string
Human-readable plan name.
object
Plan ceilings.
effectiveMaxPhoneLines / effectiveMaxEmailLines already include purchased
add-ons — compare against those, not the raw max.object
Add-ons bought so far and how many more can still be bought.
object
phoneLines and emailLines the workspace has today.boolean
Whether a phone line can be created right now.
boolean
Whether an email line can be created right now.
string
Only present when there is no active subscription:
"No active subscription", with every limit 0 and both canCreate* flags false.Errors
| Status | When | Body |
|---|---|---|
400 | Key has no active workspace | { "error": "No active workspace" } |
401 | Missing or invalid API key | { "error": "Unauthorized" } |