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 Example: `` |
|
page_token |
Type: string A page token, received from a previous call. 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 Example: |
|
repositories |
Type: Repository[] Example
|
OrganizationEmbedded
|
Name |
Description |
|
id |
Type: string Example: |
|
slug |
Type: string 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
{
"url": "example"
}
CloneURL
|
Name |
Description |
|
https |
Type: string Example: |
|
ssh |
Type: string Example: |
Example
{
"https": "example",
"ssh": "example"
}
Link.LinkType
Type: string
Enum: default, social_network, homepage, email, telegram
Link
|
Name |
Description |
|
link |
Type: string Example: |
|
type |
Type: Link.LinkType Enum: |
Example
{
"link": "example",
"type": "default"
}
RepositoryCounters
|
Name |
Description |
|
branches |
Type: string<uint64> Example: |
|
forks |
Type: string<uint64> Example: |
|
issues |
Type: string<uint64> Example: |
|
pull_requests |
Type: string<uint64> Example: |
|
tags |
Type: string<uint64> Example: |
Example
{
"forks": "example",
"pull_requests": "example",
"issues": "example",
"tags": "example",
"branches": "example"
}
Language
|
Name |
Description |
|
color |
Type: string Example: |
|
name |
Type: string Example: |
Example
{
"name": "example",
"color": "example"
}
RepositoryEmbedded
|
Name |
Description |
|
id |
Type: string Example: |
|
organization |
Type: OrganizationEmbedded Example
|
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example",
"organization": {
"id": "example",
"slug": "example"
}
}
MigrationSource
|
Name |
Description |
|
domain |
Type: string Example: |
|
url |
Type: string 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: |
|
type |
Type: RepositoryRatingReaction.Type
Enum: |
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
|
|
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. |
Example
{
"allow_external_contributions": true
}
Repository
|
Name |
Description |
|
clone_url |
Type: CloneURL Example
|
|
counters |
Type: RepositoryCounters Example
|
|
default_branch |
Type: string Example: |
|
description |
Type: string Example: |
|
id |
Type: string Example: |
|
is_empty |
Type: boolean |
|
language |
Type: Language Example
|
|
last_updated |
Type: string<date-time> Example: |
|
links |
Type: Link[] Example
|
|
logo |
Type: Image Example
|
|
migration_source |
Type: MigrationSource Example
|
|
name |
Type: string Deprecated: obsolete, prefer using slug. Will be removed in future API iterations. Example: |
|
organization |
Type: OrganizationEmbedded Example
|
|
parent |
Type: RepositoryEmbedded Example
|
|
project |
Type: ProjectEmbedded Example
|
|
rating |
Type: RepositoryRating Aggregated rating information for a repository. Example
|
|
settings |
Type: RepositorySettings Example
|
|
slug |
Type: string Example: |
|
template_type |
Type: RepoTemplate Enum: |
|
visibility |
Type: Repository.Visibility Enum: |
|
web_url |
Type: string 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: |
|
error_code |
Type: string Example: |
|
message |
Type: string Example: |
|
request_id |
Type: string Example: |