Skip to content

Create and manage recurring HTTP requests using cron-based schedules. Schedules are persistent and survive server restarts. Use these endpoints to define cron-based execution rules, list existing jobs, toggle their state, and remove schedules that are no longer needed.

GET /api/v1/curl/schedule

Retrieve a list of all recurring schedules, sorted by creation time (newest first). Shows schedule configuration, next execution time, and enabled/disabled status.

Schedule States:

  • Enabled — Active, will execute at next scheduled time
  • Disabled — Paused, will not execute (can be re-enabled)
NameInTypeRequiredDescription
pagequeryintegerNo1-based page number
limitqueryintegerNoItems per page (current handler returns all items when omitted)
{
"items": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"cron": "0 0 9 * * MON-FRI",
"enabled": true,
"created_at": "2025-01-15T10:30:00Z",
"last_run": "2025-01-15T09:00:00Z",
"name": "Weekday morning report",
"next_run": "2025-01-16T09:00:00Z",
"request": {
"url": "https://api.example.com/reports/daily",
"method": "GET"
}
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"cron": "0 0 * * * *",
"enabled": false,
"created_at": "2025-01-14T08:00:00Z",
"last_run": null,
"name": "Hourly health check",
"next_run": null,
"request": {
"url": "https://api.example.com/health",
"method": "GET"
}
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 2
}
}
const result = await client.curl.schedules.listIterator({ page: 1, limit: 20 });

GET /api/v1/curl/schedule/{id}

Retrieve complete details of a specific schedule including its cron expression, request configuration, and execution history.

NameInTypeRequiredDescription
idpathstringYesUnique schedule identifier (UUID format)
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"cron": "0 0 9 * * MON-FRI",
"enabled": true,
"created_at": "2025-01-15T10:30:00Z",
"last_run": "2025-01-15T09:00:00Z",
"name": "Weekday morning report",
"next_run": "2025-01-16T09:00:00Z",
"request": {
"url": "https://api.example.com/reports/daily",
"method": "GET",
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
}
const result = await client.curl.schedules.get("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

POST /api/v1/curl/schedule

Create a new cron-based schedule that executes an HTTP request repeatedly at specified intervals.

Cron Expression Format: 6 fields — second minute hour day month weekday

  • 0 * * * * * — Every minute
  • 0 0 * * * * — Every hour
  • 0 0 9 * * MON-FRI — Weekdays at 9 AM
  • 0 0 0 * * * — Daily at midnight
  • 0 0 12 1 * * — Monthly on 1st at noon

Common Use Cases:

  • Periodic API data collection
  • Regular health checks and monitoring
  • Scheduled report generation
  • Automated backups or synchronization
NameTypeRequiredDescription
cronstringYesSix-field cron expression: second minute hour day month weekday
requestobjectYesThe cURL request to execute on each tick. See CurlRequest for the full field reference.
{
"cron": "0 0 9 * * MON-FRI",
"request": {
"url": "https://api.example.com/reports/daily",
"method": "GET",
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
}
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"cron": "0 0 9 * * MON-FRI",
"enabled": true,
"created_at": "2025-01-15T10:30:00Z",
"request": {
"url": "https://api.example.com/reports/daily",
"method": "GET"
}
}
const result = await client.curl.schedules.create({
cron: "0 0 9 * * MON-FRI",
request: {
url: "https://api.example.com/reports/daily",
method: "GET"
}
});

PATCH /api/v1/curl/schedule/{id}/toggle

Toggle a schedule between enabled and disabled states without deleting it. Send a JSON body of {"enabled": true} to enable or {"enabled": false} to disable the schedule.

NameInTypeRequiredDescription
idpathstringYesUnique schedule identifier
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"enabled": true
}
const result = await client.curl.schedules.toggle("a1b2c3d4-e5f6-7890-abcd-ef1234567890", { enabled: true });

DELETE /api/v1/curl/schedule/{id}

Permanently delete a recurring schedule. The schedule will immediately stop executing and all configuration will be removed.

NameInTypeRequiredDescription
idpathstringYesUnique schedule identifier
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
await client.curl.schedules.delete("a1b2c3d4-e5f6-7890-abcd-ef1234567890");