curl --request POST \
--url https://app.thinnest.ai/api/v1/agents/{id}/actions/{actionId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"arguments": {
"phone": "+919876543210"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({arguments: {phone: '+919876543210'}})
};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/actions/{actionId}/test', 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}/actions/{actionId}/test"
payload = { "arguments": { "phone": "+919876543210" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"status": 200,
"result": "Next appointment: Thu 9 Oct, 11:30 AM, cleaning with Dr Mehta."
}{
"error": "`arguments` must be an object of parameter name to value."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "That action was not found."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Test Action
Make the call once, for real, through the same address checks and credentials the agent uses — and it works while the action is still off, which is the point. A failed call is still 200, with ok: false. On a POST, PUT, PATCH or DELETE action the test does the write. A build key may do this.
curl --request POST \
--url https://app.thinnest.ai/api/v1/agents/{id}/actions/{actionId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"arguments": {
"phone": "+919876543210"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({arguments: {phone: '+919876543210'}})
};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/actions/{actionId}/test', 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}/actions/{actionId}/test"
payload = { "arguments": { "phone": "+919876543210" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"status": 200,
"result": "Next appointment: Thu 9 Oct, 11:30 AM, cleaning with Dr Mehta."
}{
"error": "`arguments` must be an object of parameter name to value."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "That action was not found."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}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_…).
The action's id (act_…).
Body
Parameter name to value — what the agent would have filled in.
Response
What happened.
Whether your API answered with a success status.
Your API's HTTP status; 0 when the call could not be made at all (a blocked address, a timeout).
What the agent would have read: your answer summarised to about 4,000 characters, or why the call failed.