Queue one remediation pull request for run findings
POST
/v1/security/runs/{runId}/remediationsCreates one durable remediation batch for the selected eligible findings, or every eligible finding in the run when findingIds is omitted. The worker must create exactly one draft pull request.
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 |
|---|---|---|---|---|
| runId | path | string | Yes | Security run ID |
Query parameters
None.
Header parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| X-Computer-Agents-Organization | header | string | No | Active organization context. If omitted, the authenticated user's personal organization is used. |
| Idempotency-Key | header | string | No | — |
Body schema
Content type: application/json · Optional
| Field | Type | Required | Description |
|---|---|---|---|
| findingIds | string[] | No | — |
What the API returns
Each response code below includes the documented payload shape for the ACP API.
202Remediation batch queuedapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier. |
| repositoryId | string | Yes | — |
| findingId | string | No | — |
| findingIds | string[] | Yes | — |
| runId | string | No | — |
| status | proposed | validating | waiting_approval | approved | published | rejected | failed | cancelled | Yes | Current lifecycle status. |
| lifecycle | queued | generating | agent_running | pull_request_open | pull_request_closed | merged | verifying | fixed | deployed | verification_failed | failed | cancelled | Yes | — |
| patchDigest | string | Yes | — |
| validation | object | Yes | — |
| approvedByUserId | string | No | — |
| approvedAt | string | No | — |
| branchName | string | No | — |
| pullRequestId | string | No | — |
| pullRequestUrl | string | No | — |
| workerThreadId | string | No | — |
| sourceSha | string | No | — |
| metadata | object | Yes | Free-form metadata object. |
| createdAt | string | Yes | ISO 8601 timestamp. |
| updatedAt | string | Yes | ISO 8601 timestamp. |
402Insufficient budgetapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | No | — |
| message | string | No | Message text. |
| currentBudget | number | No | — |
404Resource not foundapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | No | — |
409The run or selected findings cannot be remediated
None.
Queue one remediation pull request for run findings
Loading...
Response 202
Loading...