List repositories available to the authenticated user.

IAM tokens and regular personal access tokens (PATs) discover the user's
organizations using the same mechanism as the private organization list.
Only organizations already registered in SourceCraft are selected; missing
organizations are not imported. Discovery may return a partial or empty
list when an organization backend fails.
Repositories in these organizations are filtered by the caller's repository
read permissions, including PAT restrictions. Repositories shared from
organizations outside the discovered list are not guaranteed to be included.
Federated users are supported with IAM tokens. PATs for federated users
and delegated PATs are not supported.

Request

GET

https://api.sourcecraft.tech/me/repos

Query parameters

Name

Description

page_size

Type: string<uint64>

The maximum number of repositories to return. The service may return fewer
than this value.

Example: ``

page_token

Type: string

A page token, received from a previous call.
Provide this to retrieve the subsequent page.

Example: ``

Responses

200 OK

A successful response.

Body

application/json
{
  "repositories": [
    {
      "id": "example",
      "name": "example",
      "default_branch": "example",
      "organization": {
        "id": "example",
        "slug": "example"
      },
      "slug": "example",
      "template_type": "not_a_template",
      "is_empty": true,
      "description": "example",
      "visibility": "public",
      "logo": {
        "url": "example"
      },
      "clone_url": {
        "https": "example",
        "ssh": "example"
      },
      "web_url": "example",
      "links": [
        {
          "link": "example",
          "type": "default"
        }
      ],
      "counters": {
        "forks": "example",
        "pull_requests": "example",
        "issues": "example",
        "tags": "example",
        "branches": "example"
      },
      "last_updated": "2025-01-01T00:00:00Z",
      "language": {
        "name": "example",
        "color": "example"
      },
      "parent": {
        "id": "example",
        "slug": "example",
        "organization": null
      },
      "migration_source": {
        "url": "example",
        "domain": "example"
      },
      "project": {
        "id": "example",
        "slug": "example"
      },
      "rating": {
        "value": 0.5,
        "percentile": 0.5,
        "reaction_counts": [
          {}
        ]
      },
      "settings": {
        "allow_external_contributions": true
      }
    }
  ],
  "next_page_token": "example"
}

Name

Description

next_page_token

Type: string

A token, which can be sent as page_token to retrieve the next page.
If this field is omitted, there are no subsequent pages.

Example: example

repositories

Type: Repository[]

Example
[
  {
    "id": "example",
    "name": "example",
    "default_branch": "example",
    "organization": {
      "id": "example",
      "slug": "example"
    },
    "slug": "example",
    "template_type": "not_a_template",
    "is_empty": true,
    "description": "example",
    "visibility": "public",
    "logo": {
      "url": "example"
    },
    "clone_url": {
      "https": "example",
      "ssh": "example"
    },
    "web_url": "example",
    "links": [
      {
        "link": "example",
        "type": "default"
      }
    ],
    "counters": {
      "forks": "example",
      "pull_requests": "example",
      "issues": "example",
      "tags": "example",
      "branches": "example"
    },
    "last_updated": "2025-01-01T00:00:00Z",
    "language": {
      "name": "example",
      "color": "example"
    },
    "parent": {
      "id": "example",
      "slug": "example",
      "organization": null
    },
    "migration_source": {
      "url": "example",
      "domain": "example"
    },
    "project": {
      "id": "example",
      "slug": "example"
    },
    "rating": {
      "value": 0.5,
      "percentile": 0.5,
      "reaction_counts": [
        {
          "type": "none",
          "count": "example"
        }
      ]
    },
    "settings": {
      "allow_external_contributions": true
    }
  }
]

OrganizationEmbedded

Name

Description

id

Type: string

Example: example

slug

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example"
}

RepoTemplate

Type: string

Enum: not_a_template, organizational, system

Repository.Visibility

Type: string

Enum: public, internal, private

Image

Name

Description

url

Type: string

Example: example

Example
{
  "url": "example"
}

CloneURL

Name

Description

https

Type: string

Example: example

ssh

Type: string

Example: example

Example
{
  "https": "example",
  "ssh": "example"
}

Link.LinkType

Type: string

Enum: default, social_network, homepage, email, telegram

Name

Description

link

Type: string

Example: example

type

Type: Link.LinkType

Enum: default, social_network, homepage, email, telegram

Example
{
  "link": "example",
  "type": "default"
}

RepositoryCounters

Name

Description

branches

Type: string<uint64>

Example: example

forks

Type: string<uint64>

Example: example

issues

Type: string<uint64>

Example: example

pull_requests

Type: string<uint64>

Example: example

tags

Type: string<uint64>

Example: example

Example
{
  "forks": "example",
  "pull_requests": "example",
  "issues": "example",
  "tags": "example",
  "branches": "example"
}

Language

Name

Description

color

Type: string

Example: example

name

Type: string

Example: example

Example
{
  "name": "example",
  "color": "example"
}

RepositoryEmbedded

Name

Description

id

Type: string

Example: example

organization

Type: OrganizationEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

slug

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  }
}

MigrationSource

Name

Description

domain

Type: string

Example: example

url

Type: string

Example: example

Example
{
  "url": "example",
  "domain": "example"
}

RepositoryRatingReaction.Type

  • none: Remove the current user's rating reaction.
  • positive_low: A low positive rating reaction. Corresponds to Like in the SourceCraft interface.
  • positive_medium: A medium positive rating reaction. Corresponds to Heart in the SourceCraft interface.
  • positive_high: A high positive rating reaction. Corresponds to Diamond in the SourceCraft interface.

Type: string

Enum: none, positive_low, positive_medium, positive_high

RepositoryRatingReactionCount

Number of rating reactions of a particular type.

Name

Description

count

Type: string<uint64>

Example: example

type

Type: RepositoryRatingReaction.Type

  • none: Remove the current user's rating reaction.
  • positive_low: A low positive rating reaction. Corresponds to Like in the SourceCraft interface.
  • positive_medium: A medium positive rating reaction. Corresponds to Heart in the SourceCraft interface.
  • positive_high: A high positive rating reaction. Corresponds to Diamond in the SourceCraft interface.

Enum: none, positive_low, positive_medium, positive_high

Example
{
  "type": "none",
  "count": "example"
}

RepositoryRating

Aggregated rating information for a repository.

Name

Description

percentile

Type: number

Repository percentile among rated repositories. Omitted while percentile data is unavailable.

reaction_counts

Type: RepositoryRatingReactionCount[]

Reaction counters grouped by reaction type.

Example
[
  {
    "type": "none",
    "count": "example"
  }
]

value

Type: number

Current repository rating value.

Example
{
  "value": 0.5,
  "percentile": 0.5,
  "reaction_counts": [
    {
      "type": "none",
      "count": "example"
    }
  ]
}

RepositorySettings

Name

Description

allow_external_contributions

Type: boolean

Whether authenticated users without organization or repository access can contribute to a public repository.
Has no effect on non-public repositories.

Example
{
  "allow_external_contributions": true
}

Repository

Name

Description

clone_url

Type: CloneURL

Example
{
  "https": "example",
  "ssh": "example"
}

counters

Type: RepositoryCounters

Example
{
  "forks": "example",
  "pull_requests": "example",
  "issues": "example",
  "tags": "example",
  "branches": "example"
}

default_branch

Type: string

Example: example

description

Type: string

Example: example

id

Type: string

Example: example

is_empty

Type: boolean

language

Type: Language

Example
{
  "name": "example",
  "color": "example"
}

last_updated

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

links

Type: Link[]

Example
[
  {
    "link": "example",
    "type": "default"
  }
]

logo

Type: Image

Example
{
  "url": "example"
}

migration_source

Type: MigrationSource

Example
{
  "url": "example",
  "domain": "example"
}

name

Type: string

Deprecated: obsolete, prefer using slug. Will be removed in future API iterations.

Example: example

organization

Type: OrganizationEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

parent

Type: RepositoryEmbedded

Example
{
  "id": "example",
  "slug": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  }
}

project

Type: ProjectEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

rating

Type: RepositoryRating

Aggregated rating information for a repository.

Example
{
  "value": 0.5,
  "percentile": 0.5,
  "reaction_counts": [
    {
      "type": "none",
      "count": "example"
    }
  ]
}

settings

Type: RepositorySettings

Example
{
  "allow_external_contributions": true
}

slug

Type: string

Example: example

template_type

Type: RepoTemplate

Enum: not_a_template, organizational, system

visibility

Type: Repository.Visibility

Enum: public, internal, private

web_url

Type: string

Example: example

Example
{
  "id": "example",
  "name": "example",
  "default_branch": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  },
  "slug": "example",
  "template_type": "not_a_template",
  "is_empty": true,
  "description": "example",
  "visibility": "public",
  "logo": {
    "url": "example"
  },
  "clone_url": {
    "https": "example",
    "ssh": "example"
  },
  "web_url": "example",
  "links": [
    {
      "link": "example",
      "type": "default"
    }
  ],
  "counters": {
    "forks": "example",
    "pull_requests": "example",
    "issues": "example",
    "tags": "example",
    "branches": "example"
  },
  "last_updated": "2025-01-01T00:00:00Z",
  "language": {
    "name": "example",
    "color": "example"
  },
  "parent": {
    "id": "example",
    "slug": "example",
    "organization": null
  },
  "migration_source": {
    "url": "example",
    "domain": "example"
  },
  "project": {
    "id": "example",
    "slug": "example"
  },
  "rating": {
    "value": 0.5,
    "percentile": 0.5,
    "reaction_counts": [
      {
        "type": "none",
        "count": "example"
      }
    ]
  },
  "settings": {
    "allow_external_contributions": true
  }
}

default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

Body

application/json
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}

Name

Description

details

Type: unknown

Example: null

error_code

Type: string

Example: example

message

Type: string

Example: example

request_id

Type: string

Example: example