POST
/v1/source-repositoriesLink a source repository to a project⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️
Links a GitHub repository to a Prisma project via an existing SCM installation.
Request body
application/json
object
installationIdstringOptional SCM installation ID to use for linking. When omitted, the API auto-picks the workspace's installation.
projectIdstringrequiredproviderstringrequiredproviderRepositoryIdintegerrequired{
"installationId": "string",
"projectId": "string",
"provider": "github",
"providerRepositoryId": 0
}Responses
object
dataobjectrequiredShow child attributes
createdAtstring · date-timerequireddefaultBranchstringrequiredidstringrequiredinstallationIdstringrequiredisPrivatebooleanrequiredprojectIdstringrequiredproviderstringrequiredrepoFullNamestringrequiredrepoIdintegerrequiredstatusstringrequiredtypestringrequiredupdatedAtstring · date-timerequiredurlstring · urirequiredhintstring{
"data": {
"createdAt": "2026-06-09T00:00:00Z",
"defaultBranch": "string",
"id": "string",
"installationId": "string",
"isPrivate": true,
"projectId": "string",
"provider": "github",
"repoFullName": "string",
"repoId": 0,
"status": "active",
"type": "source-repository",
"updatedAt": "2026-06-09T00:00:00Z",
"url": "https://example.com"
},
"hint": "string"
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}