Skip to main content
POST
/
v1
/
agent
/
:id
/
schedules
Create Schedule
curl --request POST \
  --url https://api.app.shinzo.ai/v1/agent/:id/schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "cron_expression": "<string>",
  "message_template": "<string>",
  "timezone": "<string>",
  "enabled": true
}
'

Authentication

Requires JWT token or Platform API key via Authorization: Bearer <token> header.

Path Parameters

id
string
required
Agent UUID

Body Parameters

name
string
required
Schedule name (1-255 characters)
cron_expression
string
required
Valid cron expression (e.g., 0 9 * * 1-5 for weekdays at 9am)
message_template
string
required
Message to send when schedule fires. Supports {{date}}, {{time}}, {{schedule.name}} template variables
timezone
string
default:"UTC"
Timezone for schedule evaluation (e.g., America/Los_Angeles, Europe/London)
enabled
boolean
default:"true"
Whether the schedule is active

Example Request

curl -X POST https://api.app.shinzo.ai/v1/agent/:id/schedules \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily Standup",
    "cron_expression": "0 9 * * 1-5",
    "message_template": "Generate a daily standup report for {{date}}. Review yesterday'\''s work and today'\''s priorities.",
    "timezone": "America/Los_Angeles",
    "enabled": true
  }'

Response

{
  "uuid": "schedule-abc-123",
  "agent_uuid": "agent-xyz-789",
  "name": "Daily Standup",
  "cron_expression": "0 9 * * 1-5",
  "message_template": "Generate a daily standup report for {{date}}. Review yesterday's work and today's priorities.",
  "timezone": "America/Los_Angeles",
  "enabled": true,
  "last_run_at": null,
  "next_run_at": "2026-02-27T09:00:00-08:00",
  "created_at": "2026-02-26T10:30:00Z",
  "updated_at": "2026-02-26T10:30:00Z"
}

Common Cron Expressions

ExpressionDescription
0 9 * * 1-5Every weekday at 9:00 AM
0 */4 * * *Every 4 hours
0 0 * * 0Every Sunday at midnight
30 14 1 * *First day of every month at 2:30 PM
0 8 * * 1Every Monday at 8:00 AM
0 0 1 1 *January 1st at midnight (annual)

Template Variables

VariableDescriptionExample
{{date}}Current date (ISO 8601)2026-02-26
{{time}}Current time (ISO 8601)14:30:00
{{schedule.name}}Schedule nameDaily Standup

Error Responses

400 Bad Request

  • Invalid cron expression
  • Missing required fields
  • Name exceeds 255 characters

404 Not Found

  • Agent not found or you don’t have access

429 Too Many Requests

  • Rate limit exceeded