---
title: "Connect Github Installation Route"
method: POST
path: "/api/v1/discovery/github/installations"
tags: ["discovery"]
---

# Connect Github Installation Route

`POST /api/v1/discovery/github/installations`

## Headers

- `Authorization` string, nullable
- `X-Request-ID` string, nullable

## Request body

- GithubInstallationConnect — What GitHub's setup callback hands the console: the installation id, the signed state we sent to the install page, and the OAuth code that proves the signed-in GitHub user can see that installation. The code is absent when GitHub sends the operator back from an installation that already exists (``setup_action=update``); the control plane then admits the connect only for an admin of a workspace that already holds the installation. The state is never optional: it is what proves the connect was started from this organisation.
  - `installation_id` integer, required
  - `state` string, required
  - `code` string, nullable

## Response `201`

Successful Response

- GithubInstallationRead
  - `id` string, uuid, required
  - `installation_id` integer, required
  - `account_login` string, required
  - `account_type` string, required
  - `status` 'active' | 'suspended' | 'removed', required
  - `repository_count` integer, required
  - `last_synced_at` string, date-time, nullable, required
  - `created_at` string, date-time, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-11** `3bf37c9d2784` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/xenovia/apis/controlplane/changes/api/v1/discovery/github/installations/post.md)

---

[API](https://skmtc.dev/xenovia/apis/controlplane.md) · [All operations](https://skmtc.dev/xenovia/apis/controlplane/llms.txt) · [OpenAPI document](https://skmtc.dev/xenovia/apis/controlplane/revisions/b20a3bdd6219?raw)
