Execute message (SSE)

POST/v1/threads/{threadId}/messages

Execute a message in the thread context. Returns Server-Sent Events (SSE) stream.

Requires positive budget balance.

Event Types:

  • response.started - Execution started
  • response.item.completed - Partial result (reasoning, tool call, etc.)
  • response.completed - Execution complete
  • stream.completed - Stream ended
  • stream.error - Error occurred

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
NameLocationTypeRequiredDescription
threadIdpathstringYesThread ID
Query parameters
None.

Body schema

Content type: application/json · Required

FieldTypeRequiredDescription
contentstringYesMessage content to execute.
taskstringNoLegacy alias for content.
attachmentsobject[]NoAttachments to include in the execution context.
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
quotedSelectionobjectNo
quotedSelection.textstringNo
quotedSelection.sourceTypeworking_log | run_summaryNo
researchModeEnabledbooleanNoEnable deep research mode for this execution.
truncateAtMessageIndexintegerNoRewind the thread to a specific message index before executing.
enabledSkillsstring[]NoSkill IDs to enable only for this execution.
editMessageIdstringNoEdit and re-run a previous user message.
persistFileChangesbooleanNoPersist file changes from the execution back into the attached computer state.

What the API returns

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

200SSE event streamtext/event-stream
None.
402Insufficient budgetapplication/json
FieldTypeRequiredDescription
errorstringNo
messagestringNoMessage text.
currentBudgetnumberNo
409Thread is busy (execution in progress)
None.
Execute message (SSE)
Loading...
Response 200
Loading...
See the ACP quickstart and SDK flow