AI
Generate calendar agent playground response
Runs a one-off calendar-agent turn for the prompt editor. No promptId is required; the caller supplies the calendar instructions directly via promptOverride. Calendar tools are injected when the ENABLE_CALENDAR_TOOLS feature flag is enabled, so schedulers can exercise booking flows without a live conversation.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/ai/calendar-playground" \ -H "Content-Type: application/json" \ -d '{ "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": [] }}