REST API endpoints for forks

Use the REST API to manage repository forks.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

List forks

GET /repos/{owner}/{repo}/forks

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/forks

Response schema (Status: 200):

Array of Minimal Repository:

Create a fork

POST /repos/{owner}/{repo}/forks

Create a fork for the authenticated user.
Note

Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact GitHub Support.

Note

Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/forks \
  -d '{
  "organization": "octocat",
  "name": "Hello-World",
  "default_branch_only": true
}'

Response schema (Status: 202):