batchUpdateJobs()

Signature
client.batchUpdateJobs(payload: JobBatchUpdatePayload, includeHttpDetails?: boolean): Promise<JobBatchUpdateResponse>

Parameters#

ParamTypeDescription
jobs(JobUpdatePayload & { id: string })[]Array of job objects with IDs to update (max 100)
includeHttpDetailsboolean (optional)Include HTTP headers and body from latest job run

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.batchUpdateJobs({
  jobs: [
    {
      id: '9f4a1c2b-3d4e-5f6a-7b8c-9d0e1f2a3b4c',
      name: 'Updated Name',
      schedule_cron: '0 8 * * *'
    },
    {
      id: 'a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p',
      target_url: 'https://example.com/new-hook'
    }
  ]
})

console.log(`Updated ${result.updated} jobs, failed ${result.failed}`)

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

Response#

JobBatchUpdateResponse
{
  "jobs": [
    { "id": "9f4a1c2b-3d4e-5f6a-7b8c-9d0e1f2a3b4c", "msg": "Job updated" },
    { "id": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p", "msg": "Job updated" }
  ],
  "total": 2,
  "updated": 2,
  "failed": 0
}
The webhook_signature_enabled field is always included in job responses. It is set to true when the job has a webhook_secret configured, indicating that Velora will sign outgoing requests with the X-Hub-Signature-256 header.
When includeHttpDetails=true, each job will include an http_details field with headers, body, status_code, and timestamp from the latest job run.
Maximum 100 jobs per request. Each job object must include an id field. Jobs that don't exist or fail validation will be skipped and included in the 'failed' count. Only provided fields will be updated; missing fields remain unchanged.

Required scope#

Requires: jobs:write (or jobs:update, admin, *)

Common errors#

StatuserrorCause
400validation_errorjobs is required and must be an array
400validation_errorMaximum 100 jobs per request
400validation_errorEach job must include an id field
404not_foundOne or more jobs not found
401invalid_api_keyMissing or revoked API key
403insufficient_scopeKey lacks jobs:write scope

© 2026 Velora · API Documentation