---
title: "Complete Github Connect"
method: POST
path: "/github/connect/complete"
tags: ["github"]
---

# Complete Github Connect

`POST /github/connect/complete`

Turn one GitHub return into a connection and, for one repository, a source.

## Request body

- CompleteGitHubConnectRequest — What GitHub appended to the callback, relayed by the app's callback page.
  - `state` string, nullable
  - `code` string, nullable
  - `installation_id` integer, nullable
  - `setup_action` string, nullable

## Response `200`

Successful Response

- CompleteGitHubConnectResponse — One GitHub return, as a state the callback page renders. ``status``: ``ready`` (``source`` set), ``choose_one`` (the installation covers other than exactly one repository: ``settings_url`` is where the founder narrows it), ``pending_approval`` (an organization owner must approve), ``reauthorize`` (go to ``authorize_url``, which carries a fresh state), ``no_installation``, ``expired``, or ``refused`` (``message`` is the founder-facing reason, ``reason`` its class).
  - `status` string, required
  - `return_to` string, required
  - `source` GitHubSourceResponse — The project the composer shows on its source card, and posts back as ids. ``settings_url`` is the installation's page on GitHub, where the founder picks another project.
    - `connection_id` string, uuid, required
    - `repo_id` integer, required
    - `full_name` string, required
    - `branch` string, required
    - `private` boolean, required
    - `settings_url` string, nullable
  - `settings_url` string, nullable
  - `account_login` string, nullable
  - `repository_count` integer, nullable
  - `authorize_url` string, nullable
  - `reason` string, nullable
  - `message` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-28** `9c76d9123b22` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/nanocorp/apis/nanocorp-api/changes/github/connect/complete/post.md)

---

[API](https://skmtc.dev/nanocorp/apis/nanocorp-api.md) · [All operations](https://skmtc.dev/nanocorp/apis/nanocorp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nanocorp/apis/nanocorp-api/revisions/113752ab03f9?raw)
