Batch create jobs
Create multiple jobs by providing an array of job objects. Each job object should contain the same fields as a single job creation request. Jobs that fail validation will be skipped and included in the 'failed' count.
curl -X POST https://velora-api.psalinks.com/api/v1/jobs/batch \\\n -H \"Authorization: Bearer YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"jobs\": [{\"target_url\": \"https://example.com/hook1\", \"schedule_cron\": \"0 9 * * *\"}, {\"target_url\": \"https://example.com/hook2\", \"schedule_cron\": \"0 10 * * *\"}]}'Request Body#
JobBatchCreatePayload
{
"jobs": [
{
"name": "Daily Report",
"target_url": "https://example.com/hook",
"schedule_cron": "0 9 * * *",
"timezone": "UTC",
"method": "POST",
"headers_json": { "Authorization": "Bearer token" },
"body_json": { "key": "value" }
}
]
}Response#
JobBatchCreateResponse
{
"jobs": [
{ "id": "9f4a1c2b-3d4e-5f6a-7b8c-9d0e1f2a3b4c", "status": "active" },
{ "id": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p", "status": "active" }
],
"total": 2,
"created": 2,
"failed": 0
}Maximum 100 jobs per request. Subject to your plan's job limit. Jobs that fail validation (e.g., invalid target_url or schedule_cron) will be skipped and included in the 'failed' count.
Required scope#
Requires: jobs:create (or jobs:write, admin, *)
Common errors#
| Status | error | Cause |
|---|---|---|
400 | validation_error | jobs is required and must be an array |
400 | validation_error | Maximum 100 jobs per request |
400 | validation_error | Invalid target_url or schedule_cron in one or more jobs |
403 | job_limit_exceeded | Plan job limit reached |
401 | invalid_api_key | Missing or revoked API key |
403 | insufficient_scope | Key lacks jobs:create scope |