Start monitoring an installed GitHub repository

POST/v1/security/repositories

Creates safe default policy and threat-model versions. Remediation and repository writes are disabled by default. Requires an owner, administrator, or developer role and security:write.

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
X-Computer-Agents-OrganizationheaderstringNoActive organization context. If omitted, the authenticated user's personal organization is used.

Body schema

Content type: application/json · Required

FieldTypeRequiredDescription
githubRepositoryIdstringYesInternal ID returned by `/github/security/repositories`
permissionSetobjectNo—
metadataobjectNoFree-form metadata object.

What the API returns

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

201Monitored repositoryapplication/json
FieldTypeRequiredDescription
ownershipInvitationobjectNo—
ownershipInvitation.idstringYesUnique identifier.
ownershipInvitation.organizationIdstringYes—
ownershipInvitation.kindshare | ownershipYes—
ownershipInvitation.resourceTypestringYes—
ownershipInvitation.resourceIdstringYes—
ownershipInvitation.resourceNamestringYes—
ownershipInvitation.recipientUserIdstringYes—
ownershipInvitation.invitedByUserIdstringYes—
ownershipInvitation.accessLeveluse | edit | manageYes—
ownershipInvitation.statuspending | accepted | declined | revoked | expiredYesCurrent lifecycle status.
ownershipInvitation.expiresAtstringYes—
ownershipInvitation.decidedAtstringYes—
ownershipInvitation.createdAtstringYesISO 8601 timestamp.
ownershipInvitation.updatedAtstringYesISO 8601 timestamp.
idstringYesUnique identifier.
githubRepositoryIdstringYes—
githubInstallationIdstringYes—
githubNumericRepositoryIdstringNo—
githubNumericInstallationIdstringNo—
fullNamestringYes—
defaultBranchstringYes—
privatebooleanYes—
archivedbooleanYes—
statusactive | paused | disconnectedYesCurrent lifecycle status.
currentPolicyVersionIdstringNo—
currentThreatModelVersionIdstringNo—
permissionSetobjectNo—
lastRunIdstringNo—
lastRunAtstringNo—
nextScanAtstringNo—
metadataobjectNoFree-form metadata object.
findingCountsobjectYes—
findingCounts.openintegerYes—
findingCounts.criticalintegerYes—
findingCounts.highintegerYes—
lastRunStatusqueued | running | waiting_approval | succeeded | partial | failed | cancelledNo—
lastRunStageingest | checkout | inventory | scan | validate | triage | remediate | verify | publish | completeNo—
createdAtstringYesISO 8601 timestamp.
updatedAtstringYesISO 8601 timestamp.
402Insufficient budgetapplication/json
FieldTypeRequiredDescription
errorstringNo—
messagestringNoMessage text.
currentBudgetnumberNo—
Start monitoring an installed GitHub repository
Loading...
Response 201
Loading...
See the ACP quickstart and SDK flow