Docs Sign in Get a key

Docs / API reference

Schedules API

Reference of the Hapti schedules endpoints: parameters, fields and real responses.

Every endpoint takes a key in the Authorization header: Authorization: Bearer hp_test_.... Base address: https://api.hapti.dev. The full specification is in openapi.json.

Create a schedule

HTTP
POST /v1/schedules

Runs the same task on a cron or every interval, in a time zone.

ParameterInDescription
Idempotency-KeyheaderAny unique string of 1 to 255 visible characters. The same key with the same request within 24 hours returns the first answer again instead of acting twice.
FieldTypeDescription
task (required)TaskInput
cronstring
everystring
timezonestring
namestring
start_atstring
untilstring
run_nowboolean
Response 201
{
  "id": "sch_f23abc98afc7afcc",
  "object": "schedule",
  "mode": "test",
  "name": "Monday report",
  "every": null,
  "cron": "0 8 * * 1",
  "timezone": "Europe/Lisbon",
  "paused": false,
  "next_run_at": "2026-11-23T08:00:00.000Z",
  "until": null,
  "runs": 0,
  "last_task": null,
  "last_run_at": null,
  "last_error": null,
  "task": {
    "url": "https://portal.example.com/reports",
    "goal": "Download the weekly report."
  },
  "created_at": "2026-11-22T18:40:56.222Z"
}

List schedules

HTTP
GET /v1/schedules

Every schedule of the mode.

Get a schedule

HTTP
GET /v1/schedules/{id}
ParameterInDescription
idpathSchedule id

Pause or resume a schedule

HTTP
PATCH /v1/schedules/{id}

Send paused true or false.

ParameterInDescription
idpathSchedule id
FieldTypeDescription
pausedboolean

Delete a schedule

HTTP
DELETE /v1/schedules/{id}
ParameterInDescription
idpathSchedule id

List the tasks of a schedule

HTTP
GET /v1/schedules/{id}/tasks
ParameterInDescription
idpathSchedule id