Skip to main content
POST
Simulate Goal Bot
Nothing leaves the building. No message is sent, no draft is created, no notification fires and no booking is made. This is the test chat.
Hand the bot a transcript and get back the reply it would send. toolCalls lists the tools that actually ran, so a bot that only talks about checking a calendar is obvious immediately. Also answers on POST /api/tasks/{id}/simulate.

Authentication

Pass your workspace API key as a Bearer token, or use a Clerk session token.

Path parameter

string
required
The bot id. A malformed id returns 400 invalid id.

Request body

object[]
required
The transcript, oldest first. At least one message with non-empty content is required — an empty array returns 400 messages are required.Only the last 25 messages are used, and each content is truncated to 500 characters.

Example

Success (200 OK)

Response

boolean
true when the run completed.
string
What the bot would have sent.
boolean
Whether the bot would have booked a slot. Nothing is actually booked.
number
Turns consumed in this run.
object[]
Tools the bot really invoked, each with its name. An empty array means it called nothing.
object | null
Values matched against collectFields, or null when none were collected.

Errors