List repositories shared with the current user
GET/api/user/repos/shared
listSharedRepos
Repositories outside the caller's personal workspace that a grant — to the caller's account or to one of their teams — lets them read, most recently updated first, each with the caller's strongest role and the grant it comes from. A repository reached only as a workspace admin or member is not listed. `limit` defaults to 10 and is capped at 50; the list is not paginated, and `has_more` says whether it may continue.
Requires authentication using a bearer token or a session cookie — see tokens and scopes.
curl
curl -X GET 'https://neosource.dev/api/user/repos/shared' \
-H 'Authorization: Bearer $NEOSOURCE_TOKEN'fetch
fetch("https://neosource.dev/api/user/repos/shared", {
method: "GET",
headers: {
Authorization: "Bearer $NEOSOURCE_TOKEN",
},
});Query parameters
limitHow many repositories to list; default 10, max 50.
default
10
Responses
200Shared repositories
application/json
403Forbidden — one of: forbidden, needs_scope
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 401Authentication required
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget
Schemas
Referenced above. Listed here rather than expanded inline, so the same definition is not repeated at every level.
RepoResponse
activity_atWhen the repo last changed, as the owner list sorts and shows it (ms since the epoch): the later of `updated_at` (a settings write) and its last push. Present only on `GET /api/owners/{handle}/repos` rows, whose statement reads it; absent (not `null`) everywhere else. Set only through [`RepoResponse::with_activity_at`].
allowed_merge_methodsrequiredWhich merge methods this repo permits at all. Never empty, and always in a canonical order (`merge` before `squash`) — it is a set, so the server normalises the order on write rather than echoing the order it was sent.
itemscreated_atrequiredcreated_byrequireddefault_branchrequireddefault_merge_methodrequireddelete_branch_on_mergerequiredWhether merging a PR against this repo also deletes its source branch. `true` on a repo nobody has configured — see the settings route for why this one defaults on where the merge-method fields default to today's behaviour.
descriptionrequiredmirror_source_urlmirror_status- one of
ownerrequiredparent- one of
primary_languageThe default branch's primary language: the language with the most code lines in the stored breakdown (ADR 0105, ADR 0187). Absent until a fill under the current classification policy has run, and for a repo with no code. An open vocabulary (tokei's names), like `LanguageStat::name`.
repo_idrequiredslugrequiredstar_countAll-time star count. Present on exactly four routes — `GET /api/user/stars`, `GET /api/users/{handle}/stars`, `GET /api/repos?sort=trending` and `GET /api/owners/{handle}/repos` — whose store reads carry the count in the same statement. Absent (not `null`) everywhere else, including the default `GET /api/repos`: the repo detail's `stats.star_count` is the per-repo source. Set only through [`RepoResponse::with_star_count`].
statusrequiredupdated_atrequiredversionrequiredvisibilityrequiredworkspace_idrequired
RepoRole
Repo-level role (read/write/maintain/admin). Ordered low → high so `if role >= RepoRole::Write` reads naturally.
"read""write""maintain""admin"
RepoAccessSource
Where a shared repository's role comes from, discriminated by `kind`.
A grant naming the caller's account.
kindrequired"direct"
A grant naming a team the caller is in.
kindrequired"team"team- one of