---
title: "GitHub accounts connected to the team (Settings → Git)"
method: GET
path: "/builder/sessions/{sessionId}/github/installations"
tags: ["Builder"]
---

# GitHub accounts connected to the team (Settings → Git)

`GET /builder/sessions/{sessionId}/github/installations`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/builder/sessions/{sessionId}/github/installations`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Path parameters

- `sessionId` string, uuid, required

## Response `200`

Accounts

- object
  - `items` object[], required
    - `id` string, required
    - `accountLogin` string, required
    - `accountType` 'User' | 'Organization', required

## Other responses

- `400`: Invalid request (code invalid_request); an import that fails its check answers 200 with the check and no session
- `401`: Missing or invalid session/token (code unauthorized)
- `402`: GitHub sync needs a paid plan (code upgrade_required, details.feature builder.github_export)
- `403`: Not permitted, or the GitHub App has no access to write (code forbidden, details.reason not_permitted)
- `404`: Not found, or the GitHub account is not connected to the team (code not_found)
- `409`: The repository already has code: say whether the site replaces it or the builder takes it (details.reason repository_not_empty)
- `501`: GitHub sync is not switched on for this server (code not_configured)

---

[API](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api.md) · [All operations](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/revisions/4d08337cdff1?raw)
