Create thread

POST/v1/threads

Create a new conversation thread. The thread can be project-scoped, scheduled, or immediately executed depending on the request body.

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-KeyheaderstringNoA client-generated identity for the initial turn. Retrying with the same key returns the existing execution or Batch handoff instead of scheduling duplicate work.

Body schema

Content type: application/json · Required

FieldTypeRequiredDescription
projectIdstringNoProject ID.
environmentIdstringNoEnvironment to execute in
agentIdstringNoAgent to use (optional)
titlestringNoThread title (optional)
appIdstringNo—
contentstringNoOptional first user message to execute immediately.
messagesobject[]NoOrdered initial conversation messages. The first user message is executed when present.
messages[].roleuser | assistant | systemNo—
messages[].contentstringYesRaw text content.
taskstringNoLegacy alias for `content`.
streambooleanNo—
scheduleobjectNoOptional one-time or recurring execution schedule.
attachmentsobject[]No—
attachments[].idstringNoUnique identifier.
attachments[].filenamestringNo—
attachments[].mimeTypestringNo—
attachments[].sizeintegerNo—
attachments[].typeimage | documentNo—
attachments[].urlstringNo—
attachments[].workspacePathstringNo—
attachments[].integrationSourcestringNo—
attachments[].githubRepoFullNamestringNo—
attachments[].githubRefstringNo—
attachments[].githubItemPathstringNo—
attachments[].githubSelectionTypestringNo—
githubRepoobjectNo—
githubRepo.repoFullNamestringNo—
githubRepo.repoNamestringNo—
githubRepo.branchstringNo—
metadataobjectNoFree-form metadata object.
messageMetadataobjectNo—
enabledSkillsstring[]NoBuilt-in and custom Skill IDs enabled for this execution.
reasoningEffortminimal | low | medium | highNoReasoning intensity used by the execution runtime.
envVarsobjectNo—
knowledgeContextobjectNo—
knowledgeContext.enabledbooleanNoDisable automatic Knowledge retrieval for this execution when false.
knowledgeContext.libraryIdsstring[]NoRestrict retrieval to these accessible libraries. Empty means all eligible libraries.
knowledgeContext.limitintegerNo—
knowledgeContext.moderead | propose | writeNoMaximum Knowledge capability requested for the thread. Explicit attachments default to propose; every read or mutation is still checked against the caller and resource permissions.
knowledgeContext.sourcestringNoStable client provenance such as composer or project.
knowledgeContext.bindingsobject[]NoExplicit library version snapshots to use for this execution.
knowledgeContext.bindings[].libraryIdstringYes—
knowledgeContext.bindings[].versionIdstringNo—
knowledgeContext.bindings[].versionNumberintegerNo—
knowledgeContext.bindings[].fingerprintstringNo—
knowledgeobjectNo—
knowledge.enabledbooleanNoDisable automatic Knowledge retrieval for this execution when false.
knowledge.libraryIdsstring[]NoRestrict retrieval to these accessible libraries. Empty means all eligible libraries.
knowledge.limitintegerNo—
knowledge.moderead | propose | writeNoMaximum Knowledge capability requested for the thread. Explicit attachments default to propose; every read or mutation is still checked against the caller and resource permissions.
knowledge.sourcestringNoStable client provenance such as composer or project.
knowledge.bindingsobject[]NoExplicit library version snapshots to use for this execution.
knowledge.bindings[].libraryIdstringYes—
knowledge.bindings[].versionIdstringNo—
knowledge.bindings[].versionNumberintegerNo—
knowledge.bindings[].fingerprintstringNo—
queueWhenCapacityUnavailablebooleanNoPersist the initial turn in Batches instead of failing when runtime capacity is unavailable. Defaults to true on local appliances and false on cloud deployments.

What the API returns

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

201Thread createdapplication/json
FieldTypeRequiredDescription
threadobjectNo—
thread.idstringNoUnique identifier.
thread.userIdstringNoUser ID.
thread.organizationIdstringNo—
thread.createdByUserIdstringNo—
thread.projectIdstringNoProject ID.
thread.environmentIdstringNoComputer ID.
thread.agentIdstringNoAgent ID.
thread.titlestringNoDisplay title.
thread.taskstringNo—
thread.appIdstringNo—
thread.statusactive | running | permission_asked | completed | failed | archived | cancelled | deletedNoCurrent lifecycle status.
thread.contextIdstringNo—
thread.contextNamestringNo—
thread.messageCountintegerNo—
thread.lastMessageAtstringNo—
thread.lastMessagePreviewstringNo—
thread.inputTokensintegerNo—
thread.outputTokensintegerNo—
thread.cacheTokensintegerNo—
thread.totalTokensintegerNo—
thread.agentCostnumberNo—
thread.agentCostUsdnumberNo—
thread.environmentCostnumberNo—
thread.environmentCostUsdnumberNo—
thread.totalCostnumberNo—
thread.totalCostUsdnumberNo—
thread.agentCTintegerNo—
thread.environmentCTintegerNo—
thread.totalCTintegerNo—
thread.environmentMinutesnumberNo—
thread.environmentStorageGBnumberNo—
thread.attachmentsobject[]No—
thread.metadataobjectNoFree-form metadata object.
thread.teamExecutionobjectNo—
thread.teamExecution.modeteamNo—
thread.teamExecution.teamAgentIdstringNo—
thread.teamExecution.teamAgentNamestringNo—
thread.teamExecution.orchestratorobjectNo—
thread.teamExecution.orchestrator.agentIdstringNoAgent ID.
thread.teamExecution.orchestrator.agentNamestringNo—
thread.teamExecution.orchestrator.claudeAgentNamestringNo—
thread.teamExecution.subagentsobject[]No—
thread.teamExecution.subagents[].agentIdstringNoAgent ID.
thread.teamExecution.subagents[].agentNamestringNo—
thread.teamExecution.subagents[].claudeAgentNamestringNo—
thread.subagentActivityobject[]No—
thread.subagentActivity[].agentIdstringNoAgent ID.
thread.subagentActivity[].agentNamestringNo—
thread.subagentActivity[].claudeAgentNamestringNo—
thread.subagentActivity[].eventCountintegerNo—
thread.subagentActivity[].lastActiveAtstringNo—
thread.subagentActivity[].teamAgentIdstringNo—
thread.subagentActivity[].teamAgentNamestringNo—
thread.environmentNamestringNo—
thread.agentNamestringNo—
thread.agentPhotoUrlstringNo—
thread.agentAvatarUrlstringNo—
thread.startedAtstringNoISO 8601 timestamp.
thread.completedAtstringNoISO 8601 timestamp.
thread.durationstringNo—
thread.queuedInBatchbooleanNo—
thread.batchJobIdstringNo—
thread.admissionReasonstringNo—
thread.createdAtstringNoISO 8601 timestamp.
thread.updatedAtstringNoISO 8601 timestamp.
202Thread created and its initial turn accepted by Batches because runtime capacity was unavailableapplication/json
FieldTypeRequiredDescription
threadobjectYes—
thread.idstringNoUnique identifier.
thread.userIdstringNoUser ID.
thread.organizationIdstringNo—
thread.createdByUserIdstringNo—
thread.projectIdstringNoProject ID.
thread.environmentIdstringNoComputer ID.
thread.agentIdstringNoAgent ID.
thread.titlestringNoDisplay title.
thread.taskstringNo—
thread.appIdstringNo—
thread.statusactive | running | permission_asked | completed | failed | archived | cancelled | deletedNoCurrent lifecycle status.
thread.contextIdstringNo—
thread.contextNamestringNo—
thread.messageCountintegerNo—
thread.lastMessageAtstringNo—
thread.lastMessagePreviewstringNo—
thread.inputTokensintegerNo—
thread.outputTokensintegerNo—
thread.cacheTokensintegerNo—
thread.totalTokensintegerNo—
thread.agentCostnumberNo—
thread.agentCostUsdnumberNo—
thread.environmentCostnumberNo—
thread.environmentCostUsdnumberNo—
thread.totalCostnumberNo—
thread.totalCostUsdnumberNo—
thread.agentCTintegerNo—
thread.environmentCTintegerNo—
thread.totalCTintegerNo—
thread.environmentMinutesnumberNo—
thread.environmentStorageGBnumberNo—
thread.attachmentsobject[]No—
thread.metadataobjectNoFree-form metadata object.
thread.teamExecutionobjectNo—
thread.teamExecution.modeteamNo—
thread.teamExecution.teamAgentIdstringNo—
thread.teamExecution.teamAgentNamestringNo—
thread.teamExecution.orchestratorobjectNo—
thread.teamExecution.orchestrator.agentIdstringNoAgent ID.
thread.teamExecution.orchestrator.agentNamestringNo—
thread.teamExecution.orchestrator.claudeAgentNamestringNo—
thread.teamExecution.subagentsobject[]No—
thread.teamExecution.subagents[].agentIdstringNoAgent ID.
thread.teamExecution.subagents[].agentNamestringNo—
thread.teamExecution.subagents[].claudeAgentNamestringNo—
thread.subagentActivityobject[]No—
thread.subagentActivity[].agentIdstringNoAgent ID.
thread.subagentActivity[].agentNamestringNo—
thread.subagentActivity[].claudeAgentNamestringNo—
thread.subagentActivity[].eventCountintegerNo—
thread.subagentActivity[].lastActiveAtstringNo—
thread.subagentActivity[].teamAgentIdstringNo—
thread.subagentActivity[].teamAgentNamestringNo—
thread.environmentNamestringNo—
thread.agentNamestringNo—
thread.agentPhotoUrlstringNo—
thread.agentAvatarUrlstringNo—
thread.startedAtstringNoISO 8601 timestamp.
thread.completedAtstringNoISO 8601 timestamp.
thread.durationstringNo—
thread.queuedInBatchbooleanNo—
thread.batchJobIdstringNo—
thread.admissionReasonstringNo—
thread.createdAtstringNoISO 8601 timestamp.
thread.updatedAtstringNoISO 8601 timestamp.
queuedInBatchbooleanYes—
batchJobIdstringYes—
admissionReasonstringYesStable machine-readable runtime admission reason.
executionobjectYes—
execution.successbooleanYesWhether the request succeeded.
execution.queuedbooleanYes—
402Insufficient budgetapplication/json
FieldTypeRequiredDescription
errorstringNo—
messagestringNoMessage text.
currentBudgetnumberNo—
Create thread
Loading...
Response 201
Loading...
See the ACP quickstart and SDK flow