API reference
Simulate the customer
In the sandbox, reply as the customer or answer the call, so you can test every outcome without messaging anyone.
/v1/confirmations/{id}/simulateWith a test key, nothing reaches a real phone or inbox. This endpoint plays the customer's side instead: reply to the email or message in your own words, or answer the call and talk to the agent. The agent reads it exactly as it would a real reply, and the same outcomes and webhooks follow.
Request body
actionstringrequiredreply,answer,sayordecline.channelstringoptionalFor
reply:sms(the default, the message step) oremail.textstringWhat the customer writes or says, up to 1,000 characters.
action | What it does |
|---|---|
reply | The customer replies to the email or message. The agent answers on the same channel and, if the answer is clear, closes the confirmation |
answer | The customer answers the call, which must be ringing. The agent greets them |
say | The customer says something on the call in progress. The agent's reply is added to the timeline |
decline | The customer doesn't answer the ringing call, or hangs up the one in progress |
Send the next step straight away with advance to get to the message or the call without waiting.
Returns
200 OK with the updated confirmation. The customer's words and the agent's answers are in and out events, with "live": false.
Errors
| Status | code | When |
|---|---|---|
403 | live_mode | The key is a live key |
404 | not_found | No confirmation with that id for this key |
409 | conflict | No call is ringing (answer) or in progress (say, decline) |
422 | validation_failed | An unknown action, or text is missing |
429 | rate_limited | More than 120 in 10 minutes |
Base URL https://api.anyonein.co.uk/v1 is a placeholder until the production domain is confirmed. Found a mistake? Tell us.