# GET /v1/github/installation (/docs/api/reference/github/get-installation)



<Endpoint method="GET" path="/v1/github/installation" auth="Bearer" scope="github:admin" phase="1" />

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 [#example-request]

<Tabs items="['curl', 'TypeScript', 'Python']">
  <Tab value="curl">
    ```bash
    curl https://api.layers.com/v1/github/installation \
      -H "Authorization: Bearer lp_live_01HX9Y6K7EJ4T2_4QZpN..."
    ```
  </Tab>

  <Tab value="TypeScript">
    ```ts
    const installation = await layers.github.getInstallation();
    ```
  </Tab>

  <Tab value="Python">
    ```python
    installation = layers.github.get_installation()
    ```
  </Tab>
</Tabs>

## Response [#response]

<Response status="200" description="OK">
  ```json
  {
    "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.
</Response>

<Response status="404" description="No installation registered">
  ```json
  {
    "error": {
      "code": "NOT_FOUND",
      "message": "No GitHub App installation is registered for this organization.",
      "requestId": "req_..."
    }
  }
  ```
</Response>

## Errors [#errors]

| Status | Code              | When                                                                               |
| ------ | ----------------- | ---------------------------------------------------------------------------------- |
| 401    | `UNAUTHENTICATED` | Missing or invalid key.                                                            |
| 403    | `FORBIDDEN_SCOPE` | Key lacks `github:admin`.                                                          |
| 404    | `NOT_FOUND`       | Organization has no installation bound. Call `POST /v1/github/installation` first. |
| 429    | `RATE_LIMITED`    | Read budget exhausted.                                                             |

## See also [#see-also]

* [`POST /v1/github/installation`](/docs/api/reference/github/register-installation) — bind an installation
* [`GET /v1/github/repos`](/docs/api/reference/github/list-repos) — list visible repositories
