v5

latestOpenAPI 3.1.02026-08-081,0211,3082.1 MB
AI_PLAYGROUND
SCHEDULES

Create Schedule Endpoint

Create a new scheduled report.

  • name: Name for this schedule
  • session_id: Session to report on
  • content_scope: 'last_answer' or 'full_chat'
  • frequency: 'daily', 'weekly', 'monthly', or 'custom'
  • hour: Hour to run (0-23 UTC)
  • emails: Recipients
post/playground/schedules

Request body

namestring required

Name for this schedule

session_idstring required

Session ID to schedule reports for

content_scope'first_query' | 'last_answer' | 'full_chat'

What content to include in the scheduled report.

frequency'daily' | 'weekly' | 'monthly' | 'custom'

Predefined schedule frequencies.

custom_cronstring nullable

Custom cron expression (only for 'custom' frequency)

hourinteger

Hour to run (0-23 UTC)

day_of_weekinteger nullable

Day of week for weekly frequency (0=Sunday … 6=Saturday). Only valid when frequency='weekly'. When omitted, defaults to Monday (1) to preserve existing behaviour.

day_of_monthinteger nullable

Day of month for monthly frequency (1-31). Only valid when frequency='monthly'. When omitted, defaults to the 1st. Follows standard cron semantics: schedules with day_of_month=29/30/31 only fire in months that contain that day (so day=31 skips February, April, June, September, November). Matches APScheduler's CronTrigger.from_crontab so the polled next_run and the registered periodic task stay in agreement.

emailsstring[] nullable

Email addresses to send reports to

slack_webhook_idinteger nullable

Notification ID for Slack webhook delivery. Must be a positive integer; 0 is reserved for the update path (clear selection).

Response

Successful Response

idstring uuid required
namestring required
session_idstring required
content_scope'first_query' | 'last_answer' | 'full_chat' required

What content to include in the scheduled report.

cron_exprstring required
destination_type'email' | 'slack' | 'multi' required

How to deliver the scheduled report.

Derived from destination_config at save time — MULTI means both emails and a Slack webhook are configured on the same schedule.

emailsstring[] required
slack_webhook_idinteger nullable
enabledboolean required
last_runstring date-time nullable required
next_runstring date-time nullable required
created_byinteger required
created_atstring date-time required
updated_atstring date-time required
day_of_weekinteger nullable

Cron weekday (0=Sunday … 6=Saturday) when frequency is weekly

day_of_monthinteger nullable

Cron day-of-month (1-31) when frequency is monthly