Workspace Email Preferences
curl --request POST \
--url https://app.tuco.ai/api/email-preferences \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/email-preferences"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.tuco.ai/api/email-preferences', 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/email-preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/email-preferences"
req, _ := http.NewRequest("POST", 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.post("https://app.tuco.ai/api/email-preferences")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/email-preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyWorkspace settings
Workspace Email Preferences
Read and change which Tuco notification emails a workspace sends, using that workspace’s API key.
POST
/
api
/
email-preferences
Workspace Email Preferences
curl --request POST \
--url https://app.tuco.ai/api/email-preferences \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/email-preferences"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.tuco.ai/api/email-preferences', 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/email-preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/email-preferences"
req, _ := http.NewRequest("POST", 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.post("https://app.tuco.ai/api/email-preferences")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/email-preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyControls which Tuco emails go out for one workspace. Use the workspace API key
(
tuco_…). Agencies changing this across many workspaces at once should use
Agency Email Preferences instead.Endpoint
- Method:
POSTto change,GETto read - Path:
/api/email-preferences - Auth:
Authorization: Bearer tuco_xxxxxxxxxxxxx
Email types
| Type | Covers |
|---|---|
campaign | Campaign progress and completion summaries |
reply | Inbound reply alerts. Also carries mode |
billing | Invoices, payment failures, plan changes |
system_error | Platform errors affecting your workspace |
line_health | Retained for compatibility — line-down emails are controlled by each line’s Line Down Notifications toggle, not here |
reply.mode is one of all, positive_only, debounce_5min (default) or
daily_digest.
Read
curl https://app.tuco.ai/api/email-preferences \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
{
"success": true,
"preferences": {
"line_health": { "enabled": true },
"campaign": { "enabled": true },
"reply": { "enabled": true, "mode": "debounce_5min" },
"billing": { "enabled": true },
"system_error": { "enabled": true }
}
}
Change
Send only what you want to change — everything else is preserved.curl https://app.tuco.ai/api/email-preferences \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"preferences": {
"campaign": { "enabled": false },
"reply": { "enabled": true, "mode": "daily_digest" }
}
}'
Error responses
| Status | When |
|---|---|
400 | preferences missing or not an object, an unknown email type, or an invalid reply.mode |
401 | Missing or invalid key |
403 | An agency key (tucoagency_…) was used — this is a per-workspace setting |