curl --request POST \
--url https://app.thinnest.ai/api/v1/agents/{id}/test-chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Is a 2 BHK at Sky Towers under 90 lakh?",
"session": "vr_4f1c09e2b7a84d55a1e0c3b2d9f86a71"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: 'Is a 2 BHK at Sky Towers under 90 lakh?',
session: 'vr_4f1c09e2b7a84d55a1e0c3b2d9f86a71'
})
};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/test-chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}/test-chat"
payload = {
"message": "Is a 2 BHK at Sky Towers under 90 lakh?",
"session": "vr_4f1c09e2b7a84d55a1e0c3b2d9f86a71"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"session": "vr_4f1c09e2b7a84d55a1e0c3b2d9f86a71",
"reply": "Yes — a 2 BHK at Sky Towers starts at 82 lakh. Would you like to visit the site this weekend?",
"tools": [
{
"name": "search_knowledge",
"input": {
"query": "2 BHK price Sky Towers"
},
"output": "A 2BHK starts at 82 lakh. A 3BHK starts at 1.1 crore."
}
]
}Test Chat
Talks to your real agent through its website chat — the same prompt, model, knowledge, actions, limits and billing as the console’s Playground — and answers with its reply and every tool it used. It runs as a sandbox: anything that would phone, message, email or send a code to a person, or change a calendar booking, is switched off and the agent says what it would have done instead; your own actions still run for real. The conversation appears in your inbox; send session back to continue it. A build key may do this.
curl --request POST \
--url https://app.thinnest.ai/api/v1/agents/{id}/test-chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Is a 2 BHK at Sky Towers under 90 lakh?",
"session": "vr_4f1c09e2b7a84d55a1e0c3b2d9f86a71"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: 'Is a 2 BHK at Sky Towers under 90 lakh?',
session: 'vr_4f1c09e2b7a84d55a1e0c3b2d9f86a71'
})
};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/test-chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}/test-chat"
payload = {
"message": "Is a 2 BHK at Sky Towers under 90 lakh?",
"session": "vr_4f1c09e2b7a84d55a1e0c3b2d9f86a71"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"session": "vr_4f1c09e2b7a84d55a1e0c3b2d9f86a71",
"reply": "Yes — a 2 BHK at Sky Towers starts at 82 lakh. Would you like to visit the site this weekend?",
"tools": [
{
"name": "search_knowledge",
"input": {
"query": "2 BHK price Sky Towers"
},
"output": "A 2BHK starts at 82 lakh. A 3BHK starts at 1.1 crore."
}
]
}Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Path Parameters
The agent's id (ag_…), as List Agents returns it. Another workspace's agent is the same 404 as one that never existed.
Body
Response
The agent's reply and the tools it used.
Send this back as session to continue the conversation.
"vr_4f1c09e2b7a84d55a1e0c3b2d9f86a71"
What the agent said.
Every tool it used, in order.
Show child attributes
Show child attributes
Present when the reply failed part-way; reply holds what came before.