Cancel a Batch and its native execution
POST
/v1/batch-jobs/{batchJobId}/cancelHow to call this endpoint
Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.
Path, query, and header parameters
These parameters control which ACP object the endpoint acts on and how the request is processed.
Path parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| batchJobId | path | string | Yes | — |
Query parameters
None.
Body schema
This endpoint does not require a request body.
None.
What the API returns
Each response code below includes the documented payload shape for the ACP API.
200Batch cancelledapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| job | object | Yes | — |
| job.id | string | Yes | Unique identifier. |
| job.userId | string | Yes | User ID. |
| job.organizationId | string | No | — |
| job.createdByUserId | string | No | — |
| job.name | string | Yes | Human-readable name. |
| job.description | string | Yes | Human-readable description. |
| job.targetKind | thread_run | metronome_run | evaluation_run | agent_optimization | project_ticket_action | Yes | — |
| job.targetResourceId | string | No | — |
| job.targetVersionId | string | No | — |
| job.definition | object | Yes | Native target definition. A Thread Batch may reference an existing thread with threadId (or targetResourceId), or create a new thread when released by providing message and optional agentId, environmentId/computerId, projectId, title, attachments, skills, reasoning effort, and cost boundaries. |
| job.startPolicy | manual | stay_on_shelf | when_capacity_available | Yes | manual is a one-shot shelf job started explicitly; stay_on_shelf is also started explicitly but returns to the bottom of its shelf after every successful execution; when_capacity_available is automatically released by the scheduler when runtime capacity permits. |
| job.status | held | queued | dispatching | running | succeeded | failed | cancelled | Yes | Current lifecycle status. |
| job.queueLane | string | Yes | — |
| job.priority | integer | Yes | — |
| job.position | integer | Yes | — |
| job.maxAttempts | integer | Yes | — |
| job.attemptCount | integer | Yes | — |
| job.executionGeneration | integer | Yes | — |
| job.availableAt | string | Yes | — |
| job.waitReason | string | No | — |
| job.nativeResourceType | string | No | — |
| job.nativeResourceId | string | No | — |
| job.sourceProjectId | string | No | — |
| job.sourceTicketId | string | No | — |
| job.permissionSet | string | Yes | — |
| job.idempotencyKey | string | No | — |
| job.leaseOwner | string | No | — |
| job.leaseExpiresAt | string | No | — |
| job.heartbeatAt | string | No | — |
| job.lastError | string | No | — |
| job.metadata | object | Yes | Free-form metadata object. |
| job.createdAt | string | Yes | ISO 8601 timestamp. |
| job.updatedAt | string | Yes | ISO 8601 timestamp. |
| job.queuedAt | string | No | — |
| job.startedAt | string | No | ISO 8601 timestamp. |
| job.completedAt | string | No | ISO 8601 timestamp. |
| idempotentReplay | boolean | No | — |
409Invalid state transition
None.
Cancel a Batch and its native execution
Loading...
Response 200
Loading...