Skip to content

Add a repository to an app installation

PUT
/user/installations/{installation_id}/repositories/{repository_id}

Add a single repository to an installation. The authenticated user must have admin access to the repository.

This endpoint only works for PATs (classic) with the repo scope.

API method documentation

installation_id
required
integer

The unique identifier of the installation.

Examples
Example default
1
repository_id
required
integer

The unique identifier of the repository.

Response

Not modified

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}