Skip to main content
POST
/
api
/
ai
/
calendar-playground
Generate calendar agent playground response
curl --request POST \
  --url https://your-instance.example.com/api/ai/calendar-playground \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "Can we book me in for Tuesday at 2pm?",
  "promptOverride": "<calendarAgent>You are a scheduling assistant. Ask clarifying questions and confirm before booking.</calendarAgent>",
  "conversation": [
    {
      "role": "user",
      "content": "I would like to schedule a tour."
    },
    {
      "role": "assistant",
      "content": "Sure — which day works for you?"
    }
  ]
}
'
{
  "success": true,
  "response": "Great — I can book you for Friday at 2pm. Want me to send a confirmation text?",
  "messageMetric": {
    "organizationId": "64a1b2c3d4e5f60012345678",
    "metricRunId": "run_64d2f9c5e8a1d4e001a0b1c2",
    "aiAgentName": "Leasing Specialist",
    "aiCalls": [],
    "toolCalls": []
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.tetherai.ca/llms.txt

Use this file to discover all available pages before exploring further.

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
promptOverride
string

Calendar agent system prompt text being edited by the tester

conversation
object[]

Response

Calendar playground 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:
{
"organizationId": "64a1b2c3d4e5f60012345678",
"metricRunId": "run_64d2f9c5e8a1d4e001a0b1c2",
"aiAgentName": "Leasing Specialist",
"aiCalls": [
{
"provider": "anthropic",
"model": "claude-sonnet-4-6",
"inputTokens": 412,
"outputTokens": 88,
"durationMs": 1742
}
],
"toolCalls": [
{
"name": "getContact",
"args": { "phone": "+14165550100" },
"durationMs": 84
}
]
}