Read Fallback SMS Config
curl --request GET \
--url https://app.tuco.ai/api/workspace/fallback-config \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/workspace/fallback-config"
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/workspace/fallback-config', 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/workspace/fallback-config",
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/workspace/fallback-config"
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/workspace/fallback-config")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/workspace/fallback-config")
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{
"fallbackDestination": "<string>",
"telnyxFromNumber": "<string>",
"telnyxUseOwnAccount": true,
"telnyxHasOwnApiKey": true,
"telnyxHasOwnPublicKey": true,
"telnyxApiKeyAvailable": true,
"sendFallbackSmsOnFailed": true,
"dailyLimitOverflow": "<string>",
"customWebhookEnabled": true,
"twilioEncryptionAvailable": true,
"secretsEncryptionAvailable": true
}Messages
Read Fallback SMS Config
Read where backup SMS is sent when iMessage fails, including whether your own Telnyx credentials are stored. Bearer-token auth, JSON response.
GET
/
api
/
workspace
/
fallback-config
Read Fallback SMS Config
curl --request GET \
--url https://app.tuco.ai/api/workspace/fallback-config \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/workspace/fallback-config"
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/workspace/fallback-config', 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/workspace/fallback-config",
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/workspace/fallback-config"
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/workspace/fallback-config")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/workspace/fallback-config")
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{
"fallbackDestination": "<string>",
"telnyxFromNumber": "<string>",
"telnyxUseOwnAccount": true,
"telnyxHasOwnApiKey": true,
"telnyxHasOwnPublicKey": true,
"telnyxApiKeyAvailable": true,
"sendFallbackSmsOnFailed": true,
"dailyLimitOverflow": "<string>",
"customWebhookEnabled": true,
"twilioEncryptionAvailable": true,
"secretsEncryptionAvailable": true
}Everything on the Settings → Fallbacks page is available here, so backup SMS can be set up
entirely over the API without opening the dashboard.A backup text goes out when iMessage cannot deliver, for two separate reasons: the send failed
technically, or the recipient has no iMessage. Both use the same destination.
PATCH /api/workspace/fallback-config.
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/workspace/fallback-config" \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
Success (200 OK)
{
"fallbackDestination": "telnyx",
"telnyxFromNumber": "+13055550142",
"telnyxUseOwnAccount": true,
"telnyxApiKeyAvailable": true,
"telnyxHasOwnApiKey": true,
"telnyxHasOwnPublicKey": true,
"sendFallbackSmsOnFailed": true,
"dailyLimitOverflow": "reschedule",
"twilioEncryptionAvailable": true,
"secretsEncryptionAvailable": true,
"customWebhookEnabled": false
}
Credentials are never returned.
telnyxHasOwnApiKey and telnyxHasOwnPublicKey say only
whether a key is stored — the key itself is write-only and cannot be read back.Response
string
none, ghl, twilio or telnyx. none means no backup text will ever go out.string
E.164 number backup texts are sent from, and where replies come back to.
boolean
true when sending on your own Telnyx account rather than Tuco’s.boolean
Whether your own API key is stored.
boolean
Whether your own public key is stored. Without it, replies from leads are rejected as unverified.
boolean
Whether a usable key exists at all — yours or Tuco’s.
boolean
Whether a technical send failure also triggers a backup text, not only “no iMessage”.
string
reschedule or fallback — what happens when a line hits its daily cap.boolean
Whether a custom webhook destination is configured.
boolean
Whether credential encryption is available on this workspace.
boolean
Same, for the shared secrets store.
Errors
| Status | When | Body |
|---|---|---|
400 | Key has no active workspace | { "error": "No active workspace" } |
401 | Missing or invalid API key | { "error": "Unauthorized" } |