Skip to main content

Schedule Management

The Schedule Management section covers all operations related to creating, updating, and managing scheduled HTTP requests.

Get All Schedules

Retrieve all schedules for the authenticated user.
Returns: Promise<Schedule[]>

Get Schedule by ID

Retrieve a specific schedule by its ID.
Parameters:
  • id (string, required): The unique identifier of the schedule
Returns: Promise<Schedule>

Create Schedule

Create a new scheduled HTTP request.
Parameters:
  • name (string, required): A descriptive name for the schedule
  • description (string, optional): Additional description of what the schedule does
  • cronExpression (string, required): Valid cron expression defining when to run
  • timezone (string, required): IANA timezone identifier (e.g., ‘America/New_York’) - View all options
  • endpoint (string, required): The HTTP endpoint to call
  • httpMethod (“GET” | “POST” | “PUT” | “DELETE” | “PATCH”, required): HTTP method to use
  • body (string, optional): Request body for POST/PUT/PATCH requests
  • headers (Record<string, string>, optional): HTTP headers to include in the request
  • maxRetries (number, optional): Total attempts including the first, clamped to 1-10 (default: 3)
  • timeoutSeconds (number, optional): Request timeout in seconds, clamped to 1-300 (default: 30)
  • expectedStatusCodes (string, optional): Comma-separated 3-digit codes/ranges counted as success (e.g. "200-299,410"). Omit or leave blank for the default rule (status below 400)
See the Execution Model for how success, retries, and quota work. Returns: Promise<Schedule>

Bulk Create Schedules

Pass an array (1-1000 items) to createSchedule to create many schedules in one request. Validation is all-or-nothing: if any entry is invalid or the batch exceeds a plan limit, none are created.
Returns: Promise<BulkCreateResponse> where BulkCreateResponse is { count: number; schedules: { id: string; name: string }[] }

Update Schedule

Update an existing schedule.
Parameters:
  • id (string, required): The unique identifier of the schedule to update
  • data (UpdateScheduleData, required): Object containing fields to update
UpdateScheduleData fields (all optional):
  • name (string): Update the schedule name
  • description (string): Update the description
  • cronExpression (string): Update the cron expression
  • timezone (string): Update the timezone
  • endpoint (string): Update the endpoint URL
  • httpMethod (“GET” | “POST” | “PUT” | “DELETE” | “PATCH”): Update HTTP method
  • body (string): Update request body
  • headers (Record<string, string>): Update HTTP headers
  • maxRetries (number): Total attempts including the first, clamped to 1-10
  • timeoutSeconds (number): Request timeout in seconds, clamped to 1-300
  • expectedStatusCodes (string): Comma-separated codes/ranges counted as success. Pass "" to clear back to the default rule (status below 400)
Returns: Promise<Schedule>

Delete Schedule

Delete a schedule permanently.
Parameters:
  • id (string, required): The unique identifier of the schedule to delete
Returns: Promise<void>

Toggle Schedule

Enable or disable a schedule without deleting it.
Parameters:
  • id (string, required): The unique identifier of the schedule
  • enabled (boolean, required): Whether to enable (true) or disable (false) the schedule
Returns: Promise<Schedule>

Trigger Schedule

Manually trigger a schedule to run immediately, regardless of its cron schedule.
Parameters:
  • id (string, required): The unique identifier of the schedule to trigger
Returns: Promise<string> - the id of the newly created job. Fetch its details with getJob(id).

Example: Complete Schedule Workflow