Overview
Section titled “Overview”The Request Scheduling API lets you create, inspect, toggle, and delete persistent cron-based schedules that execute HTTP requests at recurring intervals. Schedules survive server restarts and are useful for periodic data collection, health checks, scheduled report generation, and automated synchronization.
Cron expression format: six fields — second minute hour day month weekday.
| Pattern | Meaning |
|---|---|
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 the 1st at noon |
List all scheduled jobs
Section titled “List all scheduled jobs”GET /api/v1/curl/schedule
Retrieve a paginated list of all recurring schedules, sorted by creation time (newest first). Each entry includes its cron expression, request configuration, next execution time, and enabled/disabled status.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | No | 1-based page number |
limit | query | integer | No | Items per page (the handler returns all items when omitted) |
curl -X GET "https://api.hoody.com/api/v1/curl/schedule?page=1&limit=20" \ -H "Authorization: Bearer <token>"const schedules = await client.curl.schedules.listIterator({ page: 1, limit: 20,});
for await (const schedule of schedules) { console.log(schedule.id, schedule.cron);}{ "items": [ { "id": "b1e2c3a4-5678-90ab-cdef-1234567890ab", "cron": "0 0 9 * * MON-FRI", "enabled": true, "created_at": "2026-01-15T08:30:00Z", "next_run": "2026-01-16T09:00:00Z", "last_run": "2026-01-15T09:00:12Z", "name": "Daily weekday sync", "request": { "url": "https://api.example.com/sync", "method": "POST" } }, { "id": "c2f3d4e5-6789-01bc-def0-2345678901bc", "cron": "0 */15 * * * *", "enabled": false, "created_at": "2026-01-10T14:00:00Z", "next_run": null, "last_run": "2026-01-14T11:45:03Z", "name": null, "request": { "url": "https://api.example.com/health", "method": "GET" } } ], "meta": { "page": 1, "limit": 20, "total": 2 }}{ "error": "STORAGE_ERROR", "message": "Failed to read schedules"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
STORAGE_ERROR | Storage read failed | Unable to read schedules from persistent storage | Check storage directory permissions and disk availability |
Get schedule details
Section titled “Get schedule details”GET /api/v1/curl/schedule/{id}
Retrieve complete details for a single schedule, including its cron expression, embedded request configuration, and execution history (last_run, next_run).
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Unique schedule identifier (UUID format) |
curl -X GET "https://api.hoody.com/api/v1/curl/schedule/b1e2c3a4-5678-90ab-cdef-1234567890ab" \ -H "Authorization: Bearer <token>"const schedule = await client.curl.schedules.get( "b1e2c3a4-5678-90ab-cdef-1234567890ab");
console.log(schedule.cron, schedule.enabled);{ "id": "b1e2c3a4-5678-90ab-cdef-1234567890ab", "cron": "0 0 9 * * MON-FRI", "enabled": true, "created_at": "2026-01-15T08:30:00Z", "next_run": "2026-01-16T09:00:00Z", "last_run": "2026-01-15T09:00:12Z", "name": "Daily weekday sync", "request": { "url": "https://api.example.com/sync", "method": "POST", "headers": { "Content-Type": "application/json" } }}{ "error": "SCHEDULE_NOT_FOUND", "message": "Schedule not found"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
SCHEDULE_NOT_FOUND | Schedule does not exist | No schedule found with the provided ID | Verify schedule ID using the list schedules endpoint |
{ "error": "STORAGE_ERROR", "message": "Failed to read schedule"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
STORAGE_ERROR | Storage read failed | Failed to read schedule data from storage | Check storage integrity and retry |
Create a recurring scheduled job
Section titled “Create a recurring scheduled job”POST /api/v1/curl/schedule
Create a new cron-based schedule that executes an embedded HTTP request repeatedly. The schedule is persistent and is created in the enabled state.
Parameters
Section titled “Parameters”This endpoint takes no path, query, or header parameters.
Request Body
Section titled “Request Body”A JSON body is required with the schedule configuration. The schema accepts a six-field cron expression and the full request payload to execute on each tick.
curl -X POST "https://api.hoody.com/api/v1/curl/schedule" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "cron": "0 0 9 * * MON-FRI", "name": "Daily weekday sync", "request": { "url": "https://api.example.com/sync", "method": "POST", "headers": { "Content-Type": "application/json" } } }'const schedule = await client.curl.schedules.create({ cron: "0 0 9 * * MON-FRI", name: "Daily weekday sync", request: { url: "https://api.example.com/sync", method: "POST", headers: { "Content-Type": "application/json", }, },});
console.log(schedule.id, schedule.next_run);The schedule was created and activated. The response includes the full schedule object as documented under Get schedule details.
{ "error": "INVALID_CRON_EXPRESSION", "message": "Invalid cron expression: invalid field"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
INVALID_CRON_EXPRESSION | Malformed cron expression | The provided cron expression is invalid or incorrectly formatted | Use the 6-field format second minute hour day month weekday (example: 0 0 9 * * MON-FRI) |
INVALID_PARAMETER | Invalid request configuration | The embedded request contains invalid parameters | Verify that request.url is valid and all parameters match expected types |
{ "error": "SCHEDULE_CREATION_FAILED", "message": "Failed to create schedule"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
SCHEDULE_CREATION_FAILED | Schedule creation failed | Unable to create the schedule in persistent storage | Check storage permissions and disk space, then retry |
Enable or disable a schedule
Section titled “Enable or disable a schedule”PATCH /api/v1/curl/schedule/{id}/toggle
Toggle a schedule between enabled and disabled states without deleting it. Pass {"enabled": true} to resume execution or {"enabled": false} to pause it.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Unique schedule identifier |
Request Body
Section titled “Request Body”A JSON body is required with the desired enabled state.
curl -X PATCH "https://api.hoody.com/api/v1/curl/schedule/b1e2c3a4-5678-90ab-cdef-1234567890ab/toggle" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"enabled": false}'await client.curl.schedules.toggle( "b1e2c3a4-5678-90ab-cdef-1234567890ab", { enabled: false });{ "id": "b1e2c3a4-5678-90ab-cdef-1234567890ab", "enabled": false}{ "error": "SCHEDULE_NOT_FOUND", "message": "Schedule not found"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
SCHEDULE_NOT_FOUND | Schedule does not exist | Cannot toggle a schedule that does not exist | Verify the schedule ID using the list schedules endpoint |
{ "error": "STORAGE_ERROR", "message": "Failed to toggle schedule"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
STORAGE_ERROR | Storage update failed | The schedule exists but its state could not be updated in storage | Check storage permissions and retry the operation |
Delete a schedule
Section titled “Delete a schedule”DELETE /api/v1/curl/schedule/{id}
Permanently delete a recurring schedule. The schedule stops executing immediately and all configuration is removed.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Unique schedule identifier |
curl -X DELETE "https://api.hoody.com/api/v1/curl/schedule/b1e2c3a4-5678-90ab-cdef-1234567890ab" \ -H "Authorization: Bearer <token>"await client.curl.schedules.delete( "b1e2c3a4-5678-90ab-cdef-1234567890ab");{ "id": "b1e2c3a4-5678-90ab-cdef-1234567890ab", "deleted": true}{ "error": "SCHEDULE_NOT_FOUND", "message": "Schedule not found"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
SCHEDULE_NOT_FOUND | Schedule does not exist | Cannot delete a schedule that does not exist | Verify the schedule ID using the list schedules endpoint |
{ "error": "STORAGE_ERROR", "message": "Failed to delete schedule"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
STORAGE_ERROR | Storage delete failed | The schedule exists but could not be deleted from storage | Check storage permissions and retry the operation |