updateJob()

Signature
client.updateJob(id: string, payload: JobUpdatePayload, includeHttpDetails?: boolean): Promise<Job>

Parameters#

ParamTypeDescription
idstringUUID of the job to update
payloadJobUpdatePayloadPartial job fields to update (all optional)
includeHttpDetailsboolean (optional)Include HTTP headers and body from latest job run

JobUpdatePayload fields#

FieldTypeDescription
namestringHuman-readable name
folder_pathstringVirtual folder path for organization (e.g. /reports/, /checkin/monday/)
schedule_type"cron" | "interval"Scheduling mode
schedule_cronstringCron expression (when schedule_type is cron)
schedule_interval_secondsnumberInterval in seconds (when schedule_type is interval)
timezonestringIANA timezone name
target_urlstringDestination URL to call
methodstringHTTP method (GET, POST, PUT, PATCH, DELETE)
headersRecord<string, string>Custom request headers
payloadstringRaw request body string
timeout_msnumberRequest timeout in milliseconds
max_retriesnumberMax retry attempts on failure

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 jobId = '9f4a1c2b-3d4e-5f6a-7b8c-9d0e1f2a3b4c'

// Update the schedule and timeout
const result = await client.updateJob(jobId, {
  schedule_cron: '0 10 * * 1-5',
  timezone: 'Europe/London',
  timeout_ms: 60000
})

console.log(result.msg) // "Job updated"

// Move job to a different folder
await client.updateJob(jobId, {
  folder_path: '/reports/weekly/'
})

// Update the payload body
await client.updateJob(jobId, {
  payload: JSON.stringify({ env: 'production', users: true })
})

Response#

Job
{
  "id": "9f4a1c2b-3d4e-5f6a-7b8c-9d0e1f2a3b4c",
  "name": "Daily digest",
  "status": "active",
  "schedule_cron": "0 9 * * 1-5",
  "next_run_at": "2026-04-07T09:00:00.000Z",
  "webhook_signature_enabled": true
}
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, the response will include an http_details field with headers, body, status_code, and timestamp from the latest job run.
Updating schedule_cron, schedule_interval_seconds, or timezone will cause Velora to recalculate next_run_at based on the new schedule.

Required scope#

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

Common errors#

StatuserrorCause
400invalid_scheduleThe provided cron expression is malformed
401invalid_api_keyMissing or revoked API key
403insufficient_scopeKey lacks jobs:update scope
404not_foundJob does not exist

© 2026 Velora · API Documentation