> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# repos_create_fork

> Fork a repository, optionally into an organization or under a new name. GitHub forks asynchronously: the repository record comes back at once, but its git objects may not be readable for a short while.

<div className="tool-route"><span className="tool-row-method" data-method="POST">POST</span><code>{"https://api.github.com/repos/{owner}/{repo}/forks"}</code></div>

```python github_repos_create_fork.py theme={null}
from charter.packs import github

result = await github.repos_create_fork.ainvoke({"owner": ..., "repo": ...})
```

<Note>
  Requires `repo`, `read:user`.
</Note>

## Path parameters

<div className="reference-table">
  | Field                                                         | Type     | Description                                                                              |
  | ------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------- |
  | `owner` <span className="required" title="required">\*</span> | `string` | The account owner of the repository. The name is not case sensitive.                     |
  | `repo` <span className="required" title="required">\*</span>  | `string` | The name of the repository without the `.git` extension. The name is not case sensitive. |
</div>

## Body

<div className="reference-table">
  | Field               | Type      | Description                                                                                                                           |
  | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- |
  | `organization`      | `string`  | Optional parameter to specify the organization name if forking into an organization. Absent, the fork goes to the authenticated user. |
  | `name`              | `string`  | When forking from an existing repository, a new name for the fork.                                                                    |
  | `defaultBranchOnly` | `boolean` | When forking from an existing repository, fork with only the default branch.                                                          |
</div>
