Skip to main content

Schedules

Endpoints for managing scheduled chat execution.

GET /api/chats/{id}/schedule

Retrieve the scheduled job configuration for a chat.

Authentication: Required (session)

Pre-blocks: chat.lookup

Response:

{
"id": "job-123",
"chatId": "chat-456",
"interval": "daily",
"startOn": "2024-01-20T09:00:00Z",
"endOn": "2024-12-31T23:59:59Z",
"alert": true,
"enabled": true,
"lastRun": "2024-01-19T09:00:00Z",
"nextRun": "2024-01-20T09:00:00Z"
}

PUT /api/chats/{id}/schedule

Create or update a scheduled job for a chat.

Authentication: Required (session)

Pre-blocks: chat.lookup

Request Body:

FieldTypeRequiredDescription
intervalstringYesSchedule interval: hourly, daily, weekly, monthly
startOndateYesWhen to start the schedule
endOndateNoWhen to end the schedule (null for indefinite)
alertbooleanNoSend alerts on completion (default: false)
enabledbooleanNoWhether the schedule is active (default: true)

Example Request:

{
"interval": "daily",
"startOn": "2024-01-20T09:00:00Z",
"endOn": "2024-12-31T23:59:59Z",
"alert": true,
"enabled": true
}

Response:

Returns the created or updated schedule object.


DELETE /api/chats/{id}/schedule

Remove the scheduled job from a chat.

Authentication: Required (session)

Pre-blocks: chat.lookup

Response:

204 No Content

Use Cases

Scheduled chats are useful for:

  • Daily report generation
  • Periodic data analysis
  • Automated monitoring alerts
  • Recurring summarization tasks