---
title: "Replace the repositories an owned node may receive a token for"
method: PUT
path: "/api/github/nodes/{node_id}/repos"
tags: ["github"]
---

# Replace the repositories an owned node may receive a token for

`PUT /api/github/nodes/{node_id}/repos`

## Request

- Base URL: `https://app.nerdit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.nerdit.ai/api/github/nodes/{node_id}/repos`
- Auth: none declared

Replace the picked set and wake the pusher.

Every id must be a repository of one of this account's live
installations: an id from another account, an unknown one, or one of
an uninstalled App is a 422 that names nothing (the ids are not this
caller's to enumerate). The write is a replace, not a merge, so the
console's checkbox list is the whole truth. The pusher is woken after
the commit; a narrowing reaches the node and revokes the old token
from there (D-GH-C4), never from this request.

## Path parameters

- `node_id` string, uuid, required

## Request body

- GitHubNodeReposRequest: Replace the picked set. ``repo_ids`` must all be grantable to this account.
  - `repo_ids` integer[]

## Response `200`

Successful Response

- GitHubNodeReposView: The picker for one node (D-GH-C4): every grantable repo, picked or not. Only repositories of *live* installations are listed — an uninstalled or suspended App cannot mint — and a pick that survived its installation's removal is simply not shown, the way its token stopped.
  - `node_id` string, uuid, required
  - `repos` GitHubNodeRepoView[], required
    - `repo_id` integer, required
    - `full_name` string, required
    - `private` boolean, required
    - `installation_id` integer, required
    - `account_login` string, required
    - `picked` boolean, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Content

---

[API](https://skmtc.dev/nerdit/apis/nerdit-cloud-web.md) · [All operations](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/llms.txt) · [OpenAPI document](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/revisions/06e3b44b58be?raw)
