---
title: "Create a schedule"
method: POST
path: "/v1/schedules"
tags: ["schedules"]
---

# Create a schedule

`POST /v1/schedules`

## Request

- Base URL: `https://api.olostep.com`
- URL: `https://api.olostep.com/v1/schedules`
- Auth: HTTP bearer

Schedules a recurring or one-time call to an API endpoint.

## Request body

- object
  - `method` 'GET' | 'POST', required: HTTP method for the scheduled call.
  - `endpoint` string, required: The endpoint URL to call when the schedule executes.
  - `payload` object
  - `cron_expression` string: Cron expression for recurring schedules. Mutually exclusive with execute_at/text.
  - `execute_at` string: ISO 8601 datetime for one-time execution. Mutually exclusive with cron_expression/text.
  - `expression_timezone` string
  - `text` string: Natural language text to generate a cron expression from.

## Response `200`

Default Response

- object: A newly created schedule.
  - `id` string, required
  - `object` 'schedule', required
  - `type` 'recurring' | 'onetime', required
  - `method` 'GET' | 'POST', required
  - `endpoint` string, required
  - `cron_expression` string
  - `execute_at` string
  - `expression_timezone` string
  - `created` integer, nullable, required: Unix timestamp in seconds when the schedule was created.

## Other responses

- `400`: Default Response
- `401`: Default Response
- `429`: Default Response
- `502`: Default Response
- `504`: Default Response

---

[API](https://skmtc.dev/olostep/apis/olostep-api.md) · [All operations](https://skmtc.dev/olostep/apis/olostep-api/llms.txt) · [OpenAPI document](https://skmtc.dev/olostep/apis/olostep-api/revisions/13c766ab100c?raw)
