batchDeleteJobs()

Signature
client.batchDeleteJobs(payload: JobBatchDeletePayload): Promise<JobBatchDeleteResponse>

Parameters#

ParamTypeDescription
idsstring[]Array of job IDs to delete (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.batchDeleteJobs({
  ids: [
    '9f4a1c2b-3d4e-5f6a-7b8c-9d0e1f2a3b4c',
    'a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p'
  ]
})

console.log(`Deleted ${result.deleted} jobs, failed ${result.failed}`)

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

Response#

JobBatchDeleteResponse
{
  "jobs": [
    { "id": "9f4a1c2b-3d4e-5f6a-7b8c-9d0e1f2a3b4c", "msg": "Job deleted" },
    { "id": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p", "msg": "Job deleted" }
  ],
  "total": 2,
  "deleted": 2,
  "failed": 0
}
This operation is irreversible. Deleting jobs will also delete all associated job runs. Maximum 100 IDs per request. Jobs that don't exist will be skipped and included in the 'failed' count.

Required scope#

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

Common errors#

StatuserrorCause
400validation_errorids is required and must be an array
400validation_errorMaximum 100 IDs per request
401invalid_api_keyMissing or revoked API key
403insufficient_scopeKey lacks jobs:delete scope

© 2026 Velora · API Documentation