Link a GitHub App installation to the caller's organization. GitHub is asked first; an installation stays with the organization that linked it.
POST
/api/v1/git/installations
const url = 'https://example.com/api/v1/git/installations';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"installationId":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/git/installations \ --header 'Content-Type: application/json' \ --data '{ "installationId": 1 }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
installationId
required
The id GitHub shows after the App is installed.
integer format: int64
Examplegenerated
{ "installationId": 1}Responses
Section titled “Responses”Media typeapplication/json
object
installationId
required
integer format: int64
account
required
The GitHub user or organization the App is installed on.
string
suspended
required
boolean
Examplegenerated
{ "installationId": 1, "account": "example", "suspended": true}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}Linked to another organization
Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}