Skip to content
TriedDocs
Chats and SMS

Simulate inbound SMS

Feed a message into an SMS chat as if the recipient had texted back.

POSThttps://api.tried.com.au/sms-chats/{chat_id}/simulate-inbound

Processes a message as if the chat's recipient texted the agent's number, then returns the chat. Use it to test SMS agents, since mock providers receive no real inbound SMS. The message goes through the normal inbound path, including STOP keyword handling. Beyond Retell

Request#

Path parameters#

Parameter Type Required Description
chat_id string Yes An ongoing SMS chat.

Body#

Field Type Required Description
content string Yes 1 to 1600 characters.

Example request#

curl -X POST "https://api.tried.com.au/sms-chats/chat_7e8f9a0b1c2d3e4f5a6b7c8d/simulate-inbound" \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "content": "Can we do Friday instead?"
}'
const res = await fetch("https://api.tried.com.au/sms-chats/chat_7e8f9a0b1c2d3e4f5a6b7c8d/simulate-inbound", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "content": "Can we do Friday instead?"
  }),
});
const data = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/sms-chats/chat_7e8f9a0b1c2d3e4f5a6b7c8d/simulate-inbound",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "content": "Can we do Friday instead?",
    },
)
data = res.json()

Response#

200 OK with the SMS chat object, including all messages. chat_status and end_timestamp are read before the message is processed, so a STOP reply still shows ongoing here; use Get SMS chat for the current status.

Errors#

Status When
400 Validation failed, or the SMS chat has ended.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the calls scope.
404 No SMS chat with this ID in the workspace.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.