---
title: "Grant a project access to a repo"
method: POST
path: "/api/v1/projects/{projectId}/github/repos"
tags: ["GitHub integration"]
---

# Grant a project access to a repo

`POST /api/v1/projects/{projectId}/github/repos`

Validates the install belongs to this org and the repo is covered by it (live GitHub check) so a leaked management key can't grant access to arbitrary repo IDs.

## Path parameters

- `projectId` string, uuid, required

## Request body

- object
  - `installation_id` string, uuid, required — Install row UUID (from GET .../installations).
  - `repo_id` integer, required — GitHub numeric repo ID.

## Response `200`

OK

- object
  - `grant` object, required
    - `id` string, uuid, required
    - `installation_id` string, uuid, required
    - `repo_id` integer, required
    - `repo_full_name` string, required
    - `created_at` string, date-time, required

## Other responses

- `400` — Malformed input
- `401` — Missing / wrong-type / revoked token
- `404` — Resource not found in this org
- `502` — Upstream GitHub call failed

---

[API](https://skmtc.net/superlog/apis/superlog-management-api.md) · [All operations](https://skmtc.net/superlog/apis/superlog-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/superlog/superlog-management-api/revisions/2f60b7ba8dc6/schema)
