---
title: "POST /docs-projects/{projectUid}/link-github"
method: POST
path: "/docs-projects/{projectUid}/link-github"
---

# POST /docs-projects/{projectUid}/link-github

`POST /docs-projects/{projectUid}/link-github`

Convert a Forgejo-backed DocsProject into a GitHub-backed one. Reads every file from the Forgejo repo and opens a single PR on the chosen GitHub repo putting the content under scalar-docs/. A repo with no commits has nothing to collide with and nothing to review against, so it is initialised with the docs at its root on the default branch, and no pull request is returned.

## Path parameters

- `projectUid` string, required

## Request body

- object
  - `installationId` integer, required
  - `repoId` integer, required

## Response `200`

Default Response

- object
  - `pullRequest` object, nullable, required
    - `url` string, required
    - `number` integer, required
    - `branch` string, required
  - `project` DocsProject, required
    - `uid` string, required
    - `createdAt` integer, required
    - `updatedAt` integer, required
    - `name` string, required
    - `activeDeployment` ActiveDeployment, required
      - `uid` string, required
      - `domain` string, required
      - `publishedAt` integer, required
    - `lastPublished` integer, required
    - `lastPublishedUid` string, nullable, required
    - `loginPortalUid` string, required
    - `activeThemeId` string, required
    - `typesenseId` number
    - `isPrivate` boolean, required
    - `agentEnabled` boolean, required
    - `analyticsEnabled` boolean, required
    - `accessGroups` unknown, required
    - `slug` string, required
    - `publishStatus` string, required
    - `publishMessage` string, required
    - `repository` union, required
      - DocsProjectRepositoryForgejo
        - `provider` 'forgejo', required
        - `forgejoOwner` string, required
        - `forgejoRepo` string, required
        - `branch` string, required
        - `configPath` string, required
      - DocsProjectRepositoryGithub
        - `provider` 'github', required
        - `linkedBy` string, required
        - `installationId` integer, required
        - `id` integer, required
        - `name` string, required
        - `repositoryUid` string, required
        - `branch` string, required
        - `configPath` string, required
        - `publishOnMerge` boolean, required
        - `publishPreviews` boolean, required
        - `prComments` boolean, required
        - `expired` boolean, required
      - DocsProjectRepositoryBitbucket
        - `provider` 'bitbucket', required
        - `linkedBy` string, required
        - `workspaceUuid` string, required
        - `workspaceSlug` string, required
        - `repoUuid` string, required
        - `repoSlug` string, required
        - `name` string, required
        - `repositoryUid` string, required
        - `branch` string, required
        - `configPath` string, required
        - `publishOnMerge` boolean, required
        - `publishPreviews` boolean, required
        - `prComments` boolean, required
        - `expired` boolean, required
        - `webhookUuid` string, required
    - `remoteActivity` DocsProjectRemoteActivity
      - `at` integer, required
      - `branch` string, nullable, required
      - `sha` string, nullable, required
      - `actorName` string, nullable, required

## Other responses

- `400` — Bad request
- `401` — No auth
- `403` — Forbidden
- `404` — Not found
- `422` — Invalid payload
- `500` — Uncaught error

## Changes

- **2026-08-21** `4efa9fcf5c1e` — 2 info
  - added the required property `project/repository/oneOf[#/components/schemas/docs-project-repository-bitbucket]/repositoryUid` to the response with the `200` status
  - added the required property `project/repository/oneOf[#/components/schemas/docs-project-repository-github]/repositoryUid` to the response with the `200` status
- **2026-08-20** `62616e733c3b` — 4 breaking, 1 info
  - the `pullRequest` response's property type/format changed from `object`/`` to ``/`` for status `200`
  - removed the required property `pullRequest/branch` from the response with the `200` status
  - removed the required property `pullRequest/number` from the response with the `200` status
  - removed the required property `pullRequest/url` from the response with the `200` status
  - …1 more
- **2026-08-07** `8dff1e93bc68` — 1 info
  - api operation id `postdocsProjectsProjectUidLinkGithub` removed and replaced with `postDocsProjectsProjectUidLinkGithub`

[Change history](https://skmtc.dev/scalar/apis/core/changes/docs-projects/:projectUid/link-github/post.md)

---

[API](https://skmtc.dev/scalar/apis/core.md) · [All operations](https://skmtc.dev/scalar/apis/core/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scalar/core/revisions/2c53f2191a3e/schema)
