Get All Lines
curl --request GET \
--url https://app.tuco.ai/api/lines/by-user \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/lines/by-user"
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/by-user', 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/by-user",
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/by-user"
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/by-user")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/lines/by-user")
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_bodyGet All Lines
List all iMessage/SMS lines for the authenticated workspace. REST endpoint in the Tuco AI iMessage API — bearer-token auth, JSON request/response, full schema.
GET
/
api
/
lines
/
by-user
Get All Lines
curl --request GET \
--url https://app.tuco.ai/api/lines/by-user \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/lines/by-user"
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/by-user', 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/by-user",
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/by-user"
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/by-user")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/lines/by-user")
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_bodyReturns every line for the workspace with usage (new conversations and total messages for today) and health status. Use the line
_id as fromLineId when sending messages, or omit it for round-robin.Endpoint
- Method:
GET - Path:
/api/lines/by-user - Auth:
Authorization: Bearer tuco_sk_xxxxxxxxxxxxx
Example request
GET https://app.tuco.ai/api/lines/by-user
Authorization: Bearer tuco_sk_xxxxxxxxxxxxx
Success response (200)
{
"lines": [
{
"_id": "699f704bc405fae6ca299a08",
"workspaceId": "org_3ABCDbdGyF6w99hikyVN4cmo6H0",
"phone": "+16462230920",
"email": "goforlisa@icloud.com",
"firstName": "Lindsey",
"lastName": "Rodriguez",
"isActive": true,
"provisioningStatus": "active",
"lineType": "byon",
"dailyNewConversationsLimit": 20,
"dailyTotalMessagesLimit": 50,
"usage": {
"date": "2026-03-01",
"newConversationsCount": 4,
"totalMessagesCount": 11
},
"healthCheck": {
"status": "healthy",
"lastCheckedAt": "2026-03-01T20:52:00.097Z"
},
"createdAt": "2026-02-25T21:57:31.276Z",
"updatedAt": "2026-03-01T20:52:04.622Z"
}
]
}
Error responses
| Status | When | Body |
|---|---|---|
400 | No active workspace | { "error": "No active workspace" } |
401 | Missing or invalid API key | { "error": "Unauthorized" } |
500 | Server error | { "error": "Internal server error" } |
Use the Try it panel to run this request interactively.
⌘I