Execute message (SSE)
POST
/v1/threads/{threadId}/messagesExecute a message in the thread context. Returns Server-Sent Events (SSE) stream.
Requires positive budget balance.
Event Types:
response.started- Execution startedresponse.item.completed- Partial result (reasoning, tool call, etc.)response.completed- Execution completestream.completed- Stream endedstream.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
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| threadId | path | string | Yes | Thread ID |
Query parameters
None.
Body schema
Content type: application/json · Required
| Field | Type | Required | Description |
|---|---|---|---|
| content | string | Yes | Message content to execute. |
| task | string | No | Legacy alias for content. |
| attachments | object[] | No | Attachments to include in the execution context. |
| attachments[].id | string | No | Unique identifier. |
| attachments[].filename | string | No | — |
| attachments[].mimeType | string | No | — |
| attachments[].size | integer | No | — |
| attachments[].type | image | document | No | — |
| attachments[].url | string | No | — |
| attachments[].workspacePath | string | No | — |
| attachments[].integrationSource | string | No | — |
| attachments[].githubRepoFullName | string | No | — |
| attachments[].githubRef | string | No | — |
| attachments[].githubItemPath | string | No | — |
| attachments[].githubSelectionType | string | No | — |
| githubRepo | object | No | — |
| githubRepo.repoFullName | string | No | — |
| githubRepo.repoName | string | No | — |
| githubRepo.branch | string | No | — |
| quotedSelection | object | No | — |
| quotedSelection.text | string | No | — |
| quotedSelection.sourceType | working_log | run_summary | No | — |
| researchModeEnabled | boolean | No | Enable deep research mode for this execution. |
| truncateAtMessageIndex | integer | No | Rewind the thread to a specific message index before executing. |
| enabledSkills | string[] | No | Skill IDs to enable only for this execution. |
| editMessageId | string | No | Edit and re-run a previous user message. |
| persistFileChanges | boolean | No | Persist 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
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | No | — |
| message | string | No | Message text. |
| currentBudget | number | No | — |
409Thread is busy (execution in progress)
None.