batchCreateJobs()

Signature
client.batchCreateJobs(payload: JobBatchCreatePayload): Promise<JobBatchCreateResponse>

Parameters#

ParamTypeDescription
jobsJobCreatePayload[]Array of job objects to create (max 100)

Usage#

ts
import { VeloraClient } from '@rimora/velora'
import fetch from 'node-fetch'

const client = new VeloraClient({
  apiKey: process.env.VELORA_API_KEY,
  fetch: fetch as any
})

const result = await client.batchCreateJobs({
  jobs: [
    {
      name: 'Daily Report',
      target_url: 'https://example.com/hook1',
      schedule_cron: '0 9 * * *'
    },
    {
      name: 'Weekly Summary',
      target_url: 'https://example.com/hook2',
      schedule_cron: '0 10 * * 0'
    }
  ]
})

console.log(`Created ${result.created} jobs, failed ${result.failed}`)

// The endpoint is: POST /api/v1/jobs/batch

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#

StatuserrorCause
400validation_errorjobs is required and must be an array
400validation_errorMaximum 100 jobs per request
403job_limit_exceededPlan job limit reached
401invalid_api_keyMissing or revoked API key
403insufficient_scopeKey lacks jobs:create scope

© 2026 Velora · API Documentation