API / list-origin-installation-repos-via-api

API

List Origin installation repositories via the API

Discover repositories accessible to the authenticated installation with GET https://api.cursor.com/v1/origin/installation/repos. Official reference: Origin API → List App Installation Repositories.

Origin is in Early Beta and subject to change. Authenticate with an installation access token (oit_…) minted by Create Installation Access Token. Partners discover repositories through this endpoint — namespace-wide listing is not part of the partner API. Availability: Early Beta per the API overview.

Results include mirrored repositories. A mirror is read-only until it becomes a stable outbound mirror. List entries are sparse summaries; use Get Repo for full timestamps and the output-only cloneUrl.

Query parameters

Param Required Meaning
pageSize no Max repositories to return. Defaults to 30 when unset or 0. Values above 100 are clamped to 100.
pageToken no Opaque cursor from a previous response's nextPageToken. Empty for the first page. Keep the same filter when paging.
filter no Case-insensitive substring on repository names and owner namespaces. A single-slash owner/repo value matches each half. Leading/trailing whitespace ignored; empty applies no filter.
curl --request GET \
  --url 'https://api.cursor.com/v1/origin/installation/repos' \
  --header 'Authorization: Bearer oit_...'

With a name filter:

curl --request GET \
  --url 'https://api.cursor.com/v1/origin/installation/repos?filter=acme%2Frocket&pageSize=50' \
  --header 'Authorization: Bearer oit_...'

Response fields

Field Meaning
repositories Sparse repository summaries for this installation.
repositories[].id Origin repository identifier (stable; survives renames).
repositories[].name Repository name within its owner.
repositories[].fullName Combined owner and repository name, such as acme/rocket.
repositories[].owner.slug URL-facing owner slug.
repositories[].owner.id Origin owner identifier.
repositories[].owner.type Owner namespace type: team or user. Omitted when unknown.
repositories[].defaultBranch Repository default branch name.
repositories[].mirror Mirror metadata. Absent for a native repository and before a mirror's initial sync is ready.
repositories[].visibility internal or private.
nextPageToken Opaque cursor for the next page; empty when there are no more pages.
repoSelectionMode Whether the installation grants all repositories or only selected ones.

Example:

{
  "repositories": [
    {
      "id": "repo_01k2ja2000e0080000000000q4",
      "name": "rocket",
      "fullName": "acme/rocket",
      "owner": {
        "slug": "acme",
        "id": "ns_01k2ja2000e0080000000000p3",
        "type": "team"
      },
      "defaultBranch": "main",
      "visibility": "private"
    }
  ],
  "repoSelectionMode": "selected",
  "nextPageToken": ""
}

Treat page tokens as opaque. Restart pagination when filters change. A 404 never distinguishes a missing repository from one your installation cannot reach.

Base URL: https://api.cursor.com/v1/origin.