Create fork
Fork an upstream repo into a personal or team-owned fork.
Endpoints
POST /api/v1/teams/{team_slug}/repos/{repo_slug}/forks
POST /api/v1/users/{username}/repos/{repo_slug}/forks
Authenticated
Request
JSON body (all optional):
owner_team_slug(fork into a team instead of personal owner)nameslugvisibility(publicorprivate)
Usage
curl --request POST \
--header "Authorization: Bearer $GHIT_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{"owner_team_slug":"platform-forks","slug":"website-fork"}' \
"$GHIT_API_URL/v1/teams/platform/repos/website/forks"
Success
201 Created with the created fork repo record.
{
"uuid": "...",
"name": "Website",
"slug": "website-fork",
"visibility": "private",
"default_branch": "main",
"is_active": true,
"created_at": "2026-03-09T12:00:00Z"
}
Errors
403 Forbiddenwhen caller cannot access upstream or selected fork owner scope.404 Not Foundwhen upstream repo or owner scope does not exist.409 Conflictwhen fork slug/owner constraints are already taken.
Common auth errors are documented on the API overview page.