Skip to main content
POST
/
batches
/
{id}
/
cancel
Cancel batch jobs
curl --request POST \
  --url https://api.nexrender.com/api/v2/batches/{id}/cancel \
  --header 'Authorization: Bearer <token>'
{
  "batchId": "<string>",
  "status": "cancelled",
  "totalJobs": 123,
  "cancelledCount": 123,
  "skippedCount": 123,
  "jobs": [
    {
      "index": 123,
      "id": "<string>",
      "result": "cancelled",
      "status": "<string>",
      "reason": "<string>"
    }
  ],
  "cancelledJobs": [
    {
      "id": "<string>",
      "templateId": "<string>",
      "status": "<string>",
      "progress": 123,
      "stats": {
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "startedAt": "2023-11-07T05:31:56Z",
        "finishedAt": "2023-11-07T05:31:56Z",
        "errorAt": "2023-11-07T05:31:56Z",
        "totalAssets": 123,
        "renderDuration": 123,
        "error": "<string>"
      },
      "outputUrl": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication using API tokens for team-based access control.

You can generate your own API token at: https://app.nexrender.com/team/settings

Path Parameters

id
string
required

Unique batch identifier in ULID format

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$

Response

Best-effort batch cancellation completed.

Best-effort cancellation summary for a batch. Counts refer to the top-level jobs stored under the batch ID; cancelledJobs includes all unique jobs actually cancelled, including cascaded relatives.

batchId
string
required

Unique batch identifier.

status
enum<string>
required

cancelled when every top-level batch job was cancelled, partial when some were skipped, unchanged when none were cancellable.

Available options:
cancelled,
partial,
unchanged
totalJobs
integer
required

Total number of top-level jobs in the batch.

cancelledCount
integer
required

Number of top-level jobs cancelled by the request.

skippedCount
integer
required

Number of top-level jobs skipped because they were already missing or not in a cancellable state.

jobs
object[]
required
cancelledJobs
object[]
required

Jobs cancelled by the request, including any related parent, child, or sibling jobs cancelled as part of the same operation. Cancelling a child may trigger sibling cascades when those related jobs are still cancellable.