List the current user's favorites
GET/api/user/favorites
listUserFavorites
Returns up to 50 of the authenticated user's favorites (repositories, teams, issues and tickets), newest first, each with the route parts needed to link it. Only favorites the caller can currently read are listed: a favorite whose repository went private, whose grant was revoked, or whose team the caller left is omitted (the favorite itself is kept, and reappears when access is restored).
Requires authentication using a bearer token or a session cookie — see tokens and scopes.
curl
curl -X GET 'https://neosource.dev/api/user/favorites' \
-H 'Authorization: Bearer $NEOSOURCE_TOKEN'fetch
fetch("https://neosource.dev/api/user/favorites", {
method: "GET",
headers: {
Authorization: "Bearer $NEOSOURCE_TOKEN",
},
});Responses
200Favorites
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.
FavoriteIssueParts
A favorited issue or ticket. The flat ref fields are the `IssueLinkTargetLike` shape (`lib/issues/kind.ts`), so the SPA's `issueLinkTargetHref` / `issueLinkTargetRef` accept it unchanged: a ticket sets `team_key` + `team_owner`, a repo issue `primary_repo_id` + `repo_owner` + `repo_name`.
numberrequiredprimary_repo_id`None` for a ticket.
repo_namerepo_ownerRepo issues only: the repo route for `owner/repo#N`.
statusrequiredteam_keyTickets only: `KEY` in `KEY-N`.
team_ownerTickets only: the team's workspace slug.
titlerequired
FavoriteRepoParts
A favorited repo's route: `/{owner}/{slug}`.
ownerrequiredslugrequired
FavoriteTargetRef
What a favorite points at, on the wire: `{kind, id}`. `id` is the target's typed id (a repo, team or issue id).
idrequiredkindrequired
FavoriteTeamParts
A favorited team's route: `/{owner}/teams/{key}`.
keyrequirednamerequiredownerrequiredThe team's workspace slug.