Skip to main content
POST
/
v1
/
schedules
Create Schedule
curl --request POST \
  --url https://api.olostep.com/v1/schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "method": "GET",
  "endpoint": "<string>",
  "payload": {},
  "cron_expression": "<string>",
  "execute_at": "2023-11-07T05:31:56Z",
  "expression_timezone": "<string>",
  "text": "<string>"
}
'
{
  "id": "<string>",
  "type": "recurring",
  "method": "GET",
  "endpoint": "<string>",
  "cron_expression": "<string>",
  "execute_at": "2023-11-07T05:31:56Z",
  "expression_timezone": "<string>",
  "created": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
method
enum<string>
required

HTTP method for the scheduled API call. Must be either GET or POST.

Available options:
GET,
POST
endpoint
string
required

The endpoint URL to call when the schedule executes. For POST requests with Olostep endpoints, you can use short form (e.g., 'v1/scrapes', 'v1/batches', 'v1/crawls', 'v1/maps', 'v1/answers') which will be automatically prefixed with 'https://api.olostep.com/'. For other endpoints, provide the full URL.

payload
object

The payload to send with the API call. Can contain any JSON structure you need. For GET requests, this is typically empty. For POST requests, this should contain the data you want to send to the endpoint.

cron_expression
string

Cron expression in 6 fields format (minute hour day month day-of-week year) for recurring schedules. Required for recurring schedules. Mutually exclusive with execute_at and text.

execute_at
string<date-time>

ISO 8601 datetime string for one-time schedule execution. Must be a valid future datetime. Required for one-time schedules. Mutually exclusive with cron_expression.

expression_timezone
string

IANA timezone identifier (e.g., 'UTC', 'America/New_York', 'Europe/London') for the schedule. Required for recurring schedules, optional for one-time schedules. When using natural language text, this defaults to 'UTC'.

text
string

Natural language text to automatically generate a cron expression. The system will convert your text into a valid cron expression. Examples: 'every 3 minutes', 'every day at 10am', 'every Monday at 9am'. Mutually exclusive with cron_expression and execute_at. When used, expression_timezone defaults to 'UTC'.

Response

Schedule created successfully.

id
string

Unique schedule identifier

type
enum<string>

Type of schedule: 'recurring' for cron-based schedules, 'onetime' for single execution schedules

Available options:
recurring,
onetime
method
enum<string>

HTTP method for the scheduled call

Available options:
GET,
POST
endpoint
string

The endpoint URL that will be called

cron_expression
string

Cron expression (only present for recurring schedules)

execute_at
string<date-time>

Execution datetime (only present for one-time schedules)

expression_timezone
string

Timezone for the schedule

created
string<date-time>

ISO 8601 datetime when the schedule was created