Skip to content
TriedDocs
Public endpoints

Share link chat

Text fallback for a Voice Orb page when the API has no LiveKit.

POSThttps://api.tried.com.au/public/share/{token}/chat

Runs one text turn with the share link's agent and returns its reply. The Voice Orb page uses it when Get share link reports audio_available: false. Nothing is stored: send the whole conversation each time. The share token is the only credential. See Share a Voice Orb link.

Request#

Path parameters#

Parameter Type Required Description
token string Yes The share link's token.

Body#

Field Type Required Description
messages array Yes The conversation so far, oldest first, up to 40 items. Send [] for the opening turn: the agent's fixed greeting when it has one, otherwise a generated first line.
messages[].role string Yes user or agent.
messages[].content string Yes Up to 2000 characters.

Example request#

curl -X POST "https://api.tried.com.au/public/share/q3Zx8LmN0pRtUvWy/chat" \
  -H "Content-Type: application/json" \
  -d '{
  "messages": [
    { "role": "agent", "content": "Hi, thanks for calling Harbour Dental. How can I help today?" },
    { "role": "user", "content": "Are you open on Saturday?" }
  ]
}'
const res = await fetch("https://api.tried.com.au/public/share/q3Zx8LmN0pRtUvWy/chat", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    messages: [
      { role: "agent", content: "Hi, thanks for calling Harbour Dental. How can I help today?" },
      { role: "user", content: "Are you open on Saturday?" },
    ],
  }),
});
const { reply } = await res.json();
import requests

res = requests.post(
    "https://api.tried.com.au/public/share/q3Zx8LmN0pRtUvWy/chat",
    json={
        "messages": [
            {"role": "agent", "content": "Hi, thanks for calling Harbour Dental. How can I help today?"},
            {"role": "user", "content": "Are you open on Saturday?"},
        ],
    },
)
reply = res.json()["reply"]

Response#

200 OK

{ "reply": "Yes, we are open 8 am to 1 pm on Saturdays." }

Errors#

Status When
400 Validation failed, for example a missing messages, more than 40 items, an unknown role or content over 2000 characters.
403 The agent's engine returned an error. The message says why.
404 This link is not active (unknown or disabled token), or the agent no longer exists.
429 Per-IP rate limit exceeded. See Rate limits.

See Errors for the body format.