Skip to main content
POST
Bulk Create Schedules

Authorizations

x-api-key
string
header
required

API key for authentication. Get your API key from the Cronhost dashboard.

Body

application/json
Required array length: 1 - 1000 elements
name
string
required

Human-readable schedule name

Required string length: 1 - 255
Example:

"Daily Health Check"

cronExpression
string
required

Valid cron expression defining when to run

Example:

"0 9 * * *"

timezone
string
required

IANA timezone identifier

Example:

"America/New_York"

endpoint
string<uri>
required

Target HTTP endpoint URL

Example:

"https://api.example.com/health"

httpMethod
enum<string>
required

HTTP method to use for the request

Available options:
GET,
POST,
PUT,
DELETE,
PATCH
Example:

"GET"

description
string

Optional description of what the schedule does

Maximum string length: 1000
Example:

"Check API health every day at 9 AM"

body
string

Request body for POST/PUT/PATCH requests

Example:

"{\"key\": \"value\"}"

headers
string

HTTP headers as JSON string

Example:

"{\"User-Agent\": \"Cronhost-Monitor\", \"Content-Type\": \"application/json\"}"

maxRetries
integer
default:3

Total attempts including the first. Accepted values are clamped to 1-10 (0 becomes 1); out-of-range values are never rejected. Retries fire only for 5xx, 408, 429, timeouts, and network errors.

Example:

3

timeoutSeconds
integer
default:30

Request timeout in seconds. Accepted values are clamped to 1-300; out-of-range values are never rejected.

Example:

30

expectedStatusCodes
string

Optional. Comma-separated 3-digit status codes and ranges counted as success (e.g. "200-299,410"). Omit or leave blank to use the default rule (status < 400).

Example:

"200-299,410"

Response

Schedules created successfully

data
object
required
success
boolean
required
Example:

true