Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Create an SCM App installation intent

POST/v1/scm-installations/install-intentsCreate an SCM App installation intent

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Creates an installation intent for the given workspace. If an existing installation can be proven to belong to the caller it is linked immediately (alreadyLinked); otherwise the response carries a URL the user opens to install the SCM app. Pass repository (owner/name) so an installation that already covers it but cannot be linked automatically is detected and explained in hint. Currently only github is supported.

Request body

application/json
object
providerstringrequired

one of "github"

repositorystring

pattern ^[\w.-]+\/[\w.-]+$

workspaceIdstringrequired

pattern ^(wksp_)?([cC][^\s-]{8,}|[a-z0-9]+)$

Example request
{
  "provider": "github",
  "repository": "string",
  "workspaceId": "string"
}

Responses

201Installation intent created. The `installUrl` is single-use and time-limited.application/json
object
dataobjectrequired
Show child attributes
accountLoginstring
alreadyLinkedboolean
hintstring
installUrlstring · urirequired
providerstringrequired

one of "github"

typestringrequired

const "install-intent"

workspaceIdstringrequired

pattern ^(wksp_)([cC][^\s-]{8,}|[a-z0-9]+)$

Example response
{
  "data": {
    "accountLogin": "string",
    "alreadyLinked": true,
    "hint": "string",
    "installUrl": "https://example.com",
    "provider": "github",
    "type": "install-intent",
    "workspaceId": "string"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
403Workspace integration tokens cannot create install intents; a user-authenticated request is required.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Workspace not found or not accessible.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
422Validation failed (e.g. malformed workspaceId or unsupported provider).application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
429Rate limit exceeded.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu