{% extends "docs/base.html" %} {% block docs_content %}
Start an asynchronous fork operation for an upstream repo.
POST /api/v1/teams/{team_slug}/repos/{repo_slug}/forks
POST /api/v1/users/{username}/repos/{repo_slug}/forks
JSON body (all optional):
owner_team_slug (fork into a team instead of personal owner)nameslugvisibility (public or private)curl --request POST \
--header "Authorization: Bearer $PEARING_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{"owner_team_slug": "platform-forks", "slug": "website-fork"}' \
"$PEARING_API_URL/v1/teams/platform/repos/website/forks"
Use the returned fork UUID with GET /api/v1/forks/{fork_uuid} to poll until status changes from pending.
201 Created with the created fork status record, including created_by_uuid and created_by_username.
{
"uuid": "...",
"created_at": "2026-03-09T12:00:00Z",
"status": "pending"
}
The forked repo is created in the background. A later poll will return completed or failed.
403 Forbidden when caller cannot access upstream or selected fork owner scope.404 Not Found when upstream repo or owner scope does not exist.409 Conflict when the destination already has a fork or the requested slug is taken.Common auth errors are documented on the API overview page.