Publish a repository security configuration version
POST
/v1/security/repositories/{repositoryId}/versions/{versionId}/publishSelects the production repository version, creates immutable policy and threat-model revisions from its validated snapshot, recalculates scheduling, and records audit events.
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 |
|---|---|---|---|---|
| repositoryId | path | string | Yes | Monitored security repository ID |
| versionId | path | string | Yes | — |
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. |
Body schema
Content type: application/json · Optional
| Field | Type | Required | Description |
|---|---|---|---|
| snapshot | object | No | A coherent executable security configuration. Authorization, GitHub identity, monitoring state, findings, and evidence are intentionally not versioned. |
| snapshot.schemaVersion | 1 | Yes | — |
| snapshot.policy | object | Yes | — |
| snapshot.policy.schemaVersion | 1 | Yes | — |
| snapshot.policy.defaultBranch | string | Yes | — |
| snapshot.policy.scanMode | full | incremental | Yes | — |
| snapshot.policy.schedule | object | Yes | — |
| snapshot.policy.schedule.enabled | boolean | Yes | — |
| snapshot.policy.schedule.cron | string | Yes | — |
| snapshot.policy.schedule.timezone | string | Yes | — |
| snapshot.policy.pullRequests | object | Yes | — |
| snapshot.policy.pullRequests.enabled | boolean | Yes | — |
| snapshot.policy.pullRequests.branches | string[] | Yes | — |
| snapshot.policy.pullRequests.pathIncludes | string[] | Yes | — |
| snapshot.policy.pullRequests.pathExcludes | string[] | Yes | — |
| snapshot.policy.pullRequests.scanForksReadOnly | true | Yes | — |
| snapshot.policy.push | object | Yes | — |
| snapshot.policy.push.enabled | boolean | Yes | — |
| snapshot.policy.push.branches | string[] | Yes | — |
| snapshot.policy.scanners | string[] | Yes | — |
| snapshot.policy.remediation | object | Yes | — |
| snapshot.policy.remediation.mode | disabled | approval_required | Yes | — |
| snapshot.policy.remediation.minimumSeverity | critical | high | medium | low | informational | Yes | — |
| snapshot.policy.remediation.draftPullRequestsOnly | true | Yes | — |
| snapshot.policy.remediation.allowWorkflowChanges | false | Yes | — |
| snapshot.policy.remediation.maximumChangedFiles | integer | Yes | — |
| snapshot.policy.remediation.maximumPatchBytes | integer | Yes | — |
| snapshot.threatModel | object | Yes | — |
| snapshot.threatModel.schemaVersion | 1 | Yes | — |
| snapshot.threatModel.summary | string | Yes | — |
| snapshot.threatModel.entryPoints | string[] | Yes | — |
| snapshot.threatModel.untrustedInputs | string[] | Yes | — |
| snapshot.threatModel.trustBoundaries | string[] | Yes | — |
| snapshot.threatModel.sensitiveDataPaths | string[] | Yes | — |
| snapshot.threatModel.privilegedActions | string[] | Yes | — |
| snapshot.threatModel.priorityAreas | string[] | Yes | — |
| snapshot.threatModel.exclusions | object[] | Yes | — |
| snapshot.threatModel.exclusions[].path | string | Yes | Workspace-relative file path. |
| snapshot.threatModel.exclusions[].reason | string | Yes | — |
| description | string | No | Human-readable description. |
| label | string | No | — |
| name | string | No | Human-readable name. |
| metadata | object | No | Free-form metadata object. |
| publish | boolean | No | — |
What the API returns
Each response code below includes the documented payload shape for the ACP API.
200Published repository security versionapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| version | object | Yes | — |
| version.id | string | Yes | Unique identifier. |
| version.version | integer | Yes | — |
| version.label | string | Yes | — |
| version.name | string | Yes | Human-readable name. |
| version.description | string | Yes | Human-readable description. |
| version.status | saved | published | Yes | Current lifecycle status. |
| version.snapshot | object | Yes | A coherent executable security configuration. Authorization, GitHub identity, monitoring state, findings, and evidence are intentionally not versioned. |
| version.snapshot.schemaVersion | 1 | Yes | — |
| version.snapshot.policy | object | Yes | — |
| version.snapshot.policy.schemaVersion | 1 | Yes | — |
| version.snapshot.policy.defaultBranch | string | Yes | — |
| version.snapshot.policy.scanMode | full | incremental | Yes | — |
| version.snapshot.policy.schedule | object | Yes | — |
| version.snapshot.policy.schedule.enabled | boolean | Yes | — |
| version.snapshot.policy.schedule.cron | string | Yes | — |
| version.snapshot.policy.schedule.timezone | string | Yes | — |
| version.snapshot.policy.pullRequests | object | Yes | — |
| version.snapshot.policy.pullRequests.enabled | boolean | Yes | — |
| version.snapshot.policy.pullRequests.branches | string[] | Yes | — |
| version.snapshot.policy.pullRequests.pathIncludes | string[] | Yes | — |
| version.snapshot.policy.pullRequests.pathExcludes | string[] | Yes | — |
| version.snapshot.policy.pullRequests.scanForksReadOnly | true | Yes | — |
| version.snapshot.policy.push | object | Yes | — |
| version.snapshot.policy.push.enabled | boolean | Yes | — |
| version.snapshot.policy.push.branches | string[] | Yes | — |
| version.snapshot.policy.scanners | string[] | Yes | — |
| version.snapshot.policy.remediation | object | Yes | — |
| version.snapshot.policy.remediation.mode | disabled | approval_required | Yes | — |
| version.snapshot.policy.remediation.minimumSeverity | critical | high | medium | low | informational | Yes | — |
| version.snapshot.policy.remediation.draftPullRequestsOnly | true | Yes | — |
| version.snapshot.policy.remediation.allowWorkflowChanges | false | Yes | — |
| version.snapshot.policy.remediation.maximumChangedFiles | integer | Yes | — |
| version.snapshot.policy.remediation.maximumPatchBytes | integer | Yes | — |
| version.snapshot.threatModel | object | Yes | — |
| version.snapshot.threatModel.schemaVersion | 1 | Yes | — |
| version.snapshot.threatModel.summary | string | Yes | — |
| version.snapshot.threatModel.entryPoints | string[] | Yes | — |
| version.snapshot.threatModel.untrustedInputs | string[] | Yes | — |
| version.snapshot.threatModel.trustBoundaries | string[] | Yes | — |
| version.snapshot.threatModel.sensitiveDataPaths | string[] | Yes | — |
| version.snapshot.threatModel.privilegedActions | string[] | Yes | — |
| version.snapshot.threatModel.priorityAreas | string[] | Yes | — |
| version.snapshot.threatModel.exclusions | object[] | Yes | — |
| version.snapshot.threatModel.exclusions[].path | string | Yes | Workspace-relative file path. |
| version.snapshot.threatModel.exclusions[].reason | string | Yes | — |
| version.metadata | object | No | Free-form metadata object. |
| version.publishedAt | string | No | — |
| version.createdAt | string | Yes | ISO 8601 timestamp. |
| version.updatedAt | string | Yes | ISO 8601 timestamp. |
| versions | object[] | No | — |
| versions[].id | string | Yes | Unique identifier. |
| versions[].version | integer | Yes | — |
| versions[].label | string | Yes | — |
| versions[].name | string | Yes | Human-readable name. |
| versions[].description | string | Yes | Human-readable description. |
| versions[].status | saved | published | Yes | Current lifecycle status. |
| versions[].snapshot | object | Yes | A coherent executable security configuration. Authorization, GitHub identity, monitoring state, findings, and evidence are intentionally not versioned. |
| versions[].snapshot.schemaVersion | 1 | Yes | — |
| versions[].snapshot.policy | object | Yes | — |
| versions[].snapshot.policy.schemaVersion | 1 | Yes | — |
| versions[].snapshot.policy.defaultBranch | string | Yes | — |
| versions[].snapshot.policy.scanMode | full | incremental | Yes | — |
| versions[].snapshot.policy.schedule | object | Yes | — |
| versions[].snapshot.policy.schedule.enabled | boolean | Yes | — |
| versions[].snapshot.policy.schedule.cron | string | Yes | — |
| versions[].snapshot.policy.schedule.timezone | string | Yes | — |
| versions[].snapshot.policy.pullRequests | object | Yes | — |
| versions[].snapshot.policy.pullRequests.enabled | boolean | Yes | — |
| versions[].snapshot.policy.pullRequests.branches | string[] | Yes | — |
| versions[].snapshot.policy.pullRequests.pathIncludes | string[] | Yes | — |
| versions[].snapshot.policy.pullRequests.pathExcludes | string[] | Yes | — |
| versions[].snapshot.policy.pullRequests.scanForksReadOnly | true | Yes | — |
| versions[].snapshot.policy.push | object | Yes | — |
| versions[].snapshot.policy.push.enabled | boolean | Yes | — |
| versions[].snapshot.policy.push.branches | string[] | Yes | — |
| versions[].snapshot.policy.scanners | string[] | Yes | — |
| versions[].snapshot.policy.remediation | object | Yes | — |
| versions[].snapshot.policy.remediation.mode | disabled | approval_required | Yes | — |
| versions[].snapshot.policy.remediation.minimumSeverity | critical | high | medium | low | informational | Yes | — |
| versions[].snapshot.policy.remediation.draftPullRequestsOnly | true | Yes | — |
| versions[].snapshot.policy.remediation.allowWorkflowChanges | false | Yes | — |
| versions[].snapshot.policy.remediation.maximumChangedFiles | integer | Yes | — |
| versions[].snapshot.policy.remediation.maximumPatchBytes | integer | Yes | — |
| versions[].snapshot.threatModel | object | Yes | — |
| versions[].snapshot.threatModel.schemaVersion | 1 | Yes | — |
| versions[].snapshot.threatModel.summary | string | Yes | — |
| versions[].snapshot.threatModel.entryPoints | string[] | Yes | — |
| versions[].snapshot.threatModel.untrustedInputs | string[] | Yes | — |
| versions[].snapshot.threatModel.trustBoundaries | string[] | Yes | — |
| versions[].snapshot.threatModel.sensitiveDataPaths | string[] | Yes | — |
| versions[].snapshot.threatModel.privilegedActions | string[] | Yes | — |
| versions[].snapshot.threatModel.priorityAreas | string[] | Yes | — |
| versions[].snapshot.threatModel.exclusions | object[] | Yes | — |
| versions[].snapshot.threatModel.exclusions[].path | string | Yes | Workspace-relative file path. |
| versions[].snapshot.threatModel.exclusions[].reason | string | Yes | — |
| versions[].metadata | object | No | Free-form metadata object. |
| versions[].publishedAt | string | No | — |
| versions[].createdAt | string | Yes | ISO 8601 timestamp. |
| versions[].updatedAt | string | Yes | ISO 8601 timestamp. |
| repository | object | No | — |
| repository.id | string | Yes | Unique identifier. |
| repository.githubRepositoryId | string | Yes | — |
| repository.githubInstallationId | string | Yes | — |
| repository.githubNumericRepositoryId | string | No | — |
| repository.githubNumericInstallationId | string | No | — |
| repository.fullName | string | Yes | — |
| repository.defaultBranch | string | Yes | — |
| repository.private | boolean | Yes | — |
| repository.archived | boolean | Yes | — |
| repository.status | active | paused | disconnected | Yes | Current lifecycle status. |
| repository.currentPolicyVersionId | string | No | — |
| repository.currentThreatModelVersionId | string | No | — |
| repository.permissionSet | object | No | — |
| repository.lastRunId | string | No | — |
| repository.lastRunAt | string | No | — |
| repository.nextScanAt | string | No | — |
| repository.metadata | object | No | Free-form metadata object. |
| repository.findingCounts | object | Yes | — |
| repository.findingCounts.open | integer | Yes | — |
| repository.findingCounts.critical | integer | Yes | — |
| repository.findingCounts.high | integer | Yes | — |
| repository.lastRunStatus | queued | running | waiting_approval | succeeded | partial | failed | cancelled | No | — |
| repository.lastRunStage | ingest | checkout | inventory | scan | validate | triage | remediate | verify | publish | complete | No | — |
| repository.createdAt | string | Yes | ISO 8601 timestamp. |
| repository.updatedAt | string | Yes | ISO 8601 timestamp. |
404Resource not foundapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | No | — |
Publish a repository security configuration version
Loading...
Response 200
Loading...