Create a Batch job

POST/v1/batch-jobs

Adds work to the manual shelf or capacity-aware queue.

How 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
None.
Query parameters
None.
Header parameters
NameLocationTypeRequiredDescription
Idempotency-KeyheaderstringNo—

Body schema

Content type: application/json · Required

FieldTypeRequiredDescription
namestringYesHuman-readable name.
descriptionstringNoHuman-readable description.
targetKindthread_run | metronome_run | evaluation_run | agent_optimization | project_ticket_actionYes—
targetResourceIdstringNo—
targetVersionIdstringNo—
definitionobjectNoFor thread_run, provide threadId (or targetResourceId) to resume an existing thread, or provide message to create a new thread when the Batch is released. New-thread definitions may also specify agentId, environmentId/computerId, projectId, title, attachments, enabledSkills, reasoningEffort, and cost boundaries.
startPolicymanual | stay_on_shelf | when_capacity_availableNomanual 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.
queueLanestringNo—
priorityintegerNo—
maxAttemptsintegerNo—
sourceProjectIdstringNo—
sourceTicketIdstringNo—
permissionSetstringNo—
idempotencyKeystringNo—
metadataobjectNoFree-form metadata object.

What the API returns

Each response code below includes the documented payload shape for the ACP API.

201Batch job createdapplication/json
FieldTypeRequiredDescription
jobobjectYes—
job.idstringYesUnique identifier.
job.userIdstringYesUser ID.
job.organizationIdstringNo—
job.createdByUserIdstringNo—
job.ownerIdstringNo—
job.ownerUserIdstringNo—
job.ownerNamestringNo—
job.ownerEmailstringNo—
job.ownerAvatarUrlstringNo—
job.ownerobjectNo—
job.owner.userIdstringYesUser ID.
job.owner.namestringYesHuman-readable name.
job.owner.emailstringYes—
job.owner.avatarUrlstringYes—
job.creatorIdstringNo—
job.creatorUserIdstringNo—
job.creatorNamestringNo—
job.creatorEmailstringNo—
job.creatorAvatarUrlstringNo—
job.creatorobjectNo—
job.creator.userIdstringYesUser ID.
job.creator.namestringYesHuman-readable name.
job.creator.emailstringYes—
job.creator.avatarUrlstringYes—
job.namestringYesHuman-readable name.
job.descriptionstringYesHuman-readable description.
job.targetKindthread_run | metronome_run | evaluation_run | agent_optimization | project_ticket_actionYes—
job.targetResourceIdstringNo—
job.targetVersionIdstringNo—
job.definitionobjectYesNative 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.startPolicymanual | stay_on_shelf | when_capacity_availableYesmanual 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.statusheld | queued | dispatching | running | succeeded | failed | cancelledYesCurrent lifecycle status.
job.queueLanestringYes—
job.priorityintegerYes—
job.positionintegerYes—
job.maxAttemptsintegerYes—
job.attemptCountintegerYes—
job.executionGenerationintegerYes—
job.availableAtstringYes—
job.waitReasonstringNo—
job.nativeResourceTypestringNo—
job.nativeResourceIdstringNo—
job.sourceProjectIdstringNo—
job.sourceTicketIdstringNo—
job.permissionSetstringYes—
job.idempotencyKeystringNo—
job.leaseOwnerstringNo—
job.leaseExpiresAtstringNo—
job.heartbeatAtstringNo—
job.lastErrorstringNo—
job.metadataobjectYesFree-form metadata object.
job.createdAtstringYesISO 8601 timestamp.
job.updatedAtstringYesISO 8601 timestamp.
job.queuedAtstringNo—
job.startedAtstringNoISO 8601 timestamp.
job.completedAtstringNoISO 8601 timestamp.
idempotentReplaybooleanNo—
400Invalid Batch definition
None.
503Durable control plane unavailable
None.
Create a Batch job
Loading...
Response 201
Loading...
See the ACP quickstart and SDK flow