API Reference
Log In
API Reference

Complete a GitHub App installation

Called with the installation_id, setup_action, state and code from GitHub's setup redirect, or with setup_action 'link', the state and the code from GitHub's sign-in to connect an installation that already exists. The state must be one this caller started, and the code must belong to an owner of the installation's organization, so a forged installation_id cannot connect another organization. Returns pending_approval when an organization owner still has to approve the request, and choose_installation when a link finds several installations, to link again with the one picked.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string

Team to read or write, as the team's hashid (the same id as /v2/api/teams/{id}). The caller must belong to it or be able to read it: 403 otherwise, 404 when no such team exists. An API key may only name its own organization. Omit it for the API key's organization, or for a signed-in user the first organization they belong to.

Body Params
int64 | null

installation_id from GitHub's setup redirect; null when setupAction is 'request', and for 'link' unless the person picked one of several

string

setup_action from GitHub's setup redirect: install, update or request; link after GitHub's sign-in

string

The state from GitHub's setup redirect, issued by the install-sessions endpoint

string | null

code from GitHub's setup redirect, proving the GitHub user can manage the installation; required unless setupAction is 'request'

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*