Send Typing Indicator
curl --request POST \
--url https://app.tuco.ai/api/messages/typing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messageId": "<string>"
}
'import requests
url = "https://app.tuco.ai/api/messages/typing"
payload = { "messageId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({messageId: '<string>'})
};
fetch('https://app.tuco.ai/api/messages/typing', 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/messages/typing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'messageId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.tuco.ai/api/messages/typing"
payload := strings.NewReader("{\n \"messageId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/messages/typing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"messageId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/messages/typing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"messageId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyMessages
Send Typing Indicator
Start a short iMessage typing signal before sending a message. REST endpoint in the Tuco AI iMessage API — bearer-token auth, JSON request/response, full.
POST
/
api
/
messages
/
typing
Send Typing Indicator
curl --request POST \
--url https://app.tuco.ai/api/messages/typing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messageId": "<string>"
}
'import requests
url = "https://app.tuco.ai/api/messages/typing"
payload = { "messageId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({messageId: '<string>'})
};
fetch('https://app.tuco.ai/api/messages/typing', 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/messages/typing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'messageId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.tuco.ai/api/messages/typing"
payload := strings.NewReader("{\n \"messageId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/messages/typing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"messageId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/messages/typing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"messageId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyThis endpoint is best-effort visual polish. It should not block your send flow. Native clients can clear typing on their own timing.
When To Use This Endpoint
Use typing when you want your integration to feel more natural right before a real reply. Common usage:- your system decides it is about to respond
- you call
POST /api/messages/typing - you wait a short moment
- you send the actual message
Authentication
Pass your workspace API key as a Bearer token, or use a Clerk session token.Authorization: Bearer tuco_xxxxxxxxxxxxx
Request body
string
Required. A Tuco message id in your workspace. Tuco uses it to resolve the correct line and chat target.
Start typing
curl -X POST "https://app.tuco.ai/api/messages/typing" \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"messageId": "6a07878bafb1789f8fcb68e6"
}'
Success (200 OK)
{
"ok": true,
"typing": true,
"note": "Typing started. the messaging backend clears typing automatically; use this as a short pre-send signal."
}
Stop typing
Use the same endpoint withDELETE.
curl -X DELETE "https://app.tuco.ai/api/messages/typing" \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"messageId": "6a07878bafb1789f8fcb68e6"
}'
Success (200 OK)
{
"ok": true,
"typing": false,
"note": "Stop-typing sent best-effort. Native clients may clear typing on their own timing."
}
Error responses
| Status | When | Body |
|---|---|---|
400 | Message cannot be resolved to a valid chat target | { "error": "..." } |
401 | Missing or invalid API key / session | { "error": "Unauthorized" } |
502 | The upstream provider returned an error | { "error": "Upstream provider error: ..." } |
Notes
- Use typing shortly before a real send.
- Treat stop-typing as best effort only.
- Do not depend on typing indicators for delivery correctness.
- The most reliable way to end typing is still sending the real message.