Create fork

Start an asynchronous fork operation for an upstream repo.

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)
  • name
  • slug
  • visibility (public or private)

Usage

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.

Success

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.

Errors

  • 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.