> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shinzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Schedule

> Create a recurring cron schedule for an agent

## Authentication

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

## Path Parameters

<ParamField path="id" type="string" required>Agent UUID</ParamField>

## Body Parameters

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

## Example Request

```bash theme={null}
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

```json theme={null}
{
  "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

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

## Template Variables

| Variable            | Description             | Example         |
| ------------------- | ----------------------- | --------------- |
| `{{date}}`          | Current date (ISO 8601) | `2026-02-26`    |
| `{{time}}`          | Current time (ISO 8601) | `14:30:00`      |
| `{{schedule.name}}` | Schedule name           | `Daily 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
