Layers
Partner APIAPI referenceGitHub

GET /v1/github/installation

Read the currently registered GitHub App installation for your organization.

View as Markdown
GET/v1/github/installation
Phase 1stable
Auth
Bearer
Scope
github:admin

Returns the GitHub App installation bound to your Layers organization, plus its liveness status. An installation is active if Layers can still create tokens against it; it becomes uninstalled the moment someone removes the App in GitHub, and future ingest calls will return 422 VALIDATION.

Use this to detect a broken binding before kicking off a batch of ingest/github jobs, and to show the end-customer which GitHub org they're currently connected through.

Example request

curl https://api.layers.com/v1/github/installation \
  -H "Authorization: Bearer lp_live_01HX9Y6K7EJ4T2_4QZpN..."
const installation = await layers.github.getInstallation();
installation = layers.github.get_installation()

Response

200OK
{
  "installationId": 124677199,
  "githubAccount": {
    "login": "acme-coffee",
    "type": "Organization"
  },
  "orgLogin": "acme-coffee",
  "status": "active",
  "registeredAt": "2026-04-17T09:16:27.850881+00:00",
  "lastVerifiedAt": "2026-04-17T09:16:25.708902+00:00"
}

githubAccount describes the account the App is installed on. type is "Organization" or "User". orgLogin is a flat alias for githubAccount.login, kept for clients that don't need the type.

404No installation registered
{
  "error": {
    "code": "NOT_FOUND",
    "message": "No GitHub App installation is registered for this organization.",
    "requestId": "req_..."
  }
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing or invalid key.
403FORBIDDEN_SCOPEKey lacks github:admin.
404NOT_FOUNDOrganization has no installation bound. Call POST /v1/github/installation first.
429RATE_LIMITEDRead budget exhausted.

See also

On this page