Skip to main content
POST
Generate playground AI response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
message
string
required

The latest user turn to send into the agent. Appended to conversation server-side; do not include it twice.

promptId
string
required

Identifies the saved prompt to run this turn against. Required — the playground refuses to run without a target prompt.

conversationId
string

Optional id of an existing conversation used for context lookup (variables, business context). The playground does not persist back into it.

conversation
object[]

Prior turns the editor is replaying for this playground session. The server does not load history from storage — whatever is sent here is the entire visible history.

Response

AI response generated

Playground turn result. approvalCards is only set when the agent paused for tool approval; messageMetric is only set for ADMIN/SUPERADMIN.

success
enum<boolean>
required
Available options:
true
response
string
required
approvalCards
object[]
messageMetric
object

MessageMetric snapshot captured for the playground turn — only included for ADMIN/SUPERADMIN callers. Surfaces underlying AI calls and tool calls for debugging.

Example: