# Branch

These methods allow you to create and manage branches in your Neon project. For related information, see [Manage branches](https://neon.com/docs/manage/branches).

## Operations

| Method | Path | Operation |
| --- | --- | --- |
| `POST` | `/projects/{project_id}/branch_anonymized` | [Create anonymized branch](../createprojectbranchanonymized.md) |
| `GET` | `/projects/{project_id}/branches` | [List branches](../listprojectbranches.md) |
| `POST` | `/projects/{project_id}/branches` | [Create branch](../createprojectbranch.md) |
| `GET` | `/projects/{project_id}/branches/count` | [Retrieve number of branches](../countprojectbranches.md) |
| `DELETE` | `/projects/{project_id}/branches/{branch_id}` | [Delete branch](../deleteprojectbranch.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}` | [Retrieve branch details](../getprojectbranch.md) |
| `PATCH` | `/projects/{project_id}/branches/{branch_id}` | [Update branch](../updateprojectbranch.md) |
| `POST` | `/projects/{project_id}/branches/{branch_id}/anonymize` | [Start anonymization](../startanonymization.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/anonymized_status` | [Retrieve anonymized branch status](../getanonymizedbranchstatus.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/compare_schema` | [Compare database schema](../getprojectbranchschemacomparison.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/databases` | [List databases](../listprojectbranchdatabases.md) |
| `POST` | `/projects/{project_id}/branches/{branch_id}/databases` | [Create database](../createprojectbranchdatabase.md) |
| `DELETE` | `/projects/{project_id}/branches/{branch_id}/databases/{database_name}` | [Delete database](../deleteprojectbranchdatabase.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/databases/{database_name}` | [Retrieve database details](../getprojectbranchdatabase.md) |
| `PATCH` | `/projects/{project_id}/branches/{branch_id}/databases/{database_name}` | [Update database](../updateprojectbranchdatabase.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/endpoints` | [List branch endpoints](../listprojectbranchendpoints.md) |
| `POST` | `/projects/{project_id}/branches/{branch_id}/finalize_restore` | [Finalize branch restore from snapshot](../finalizerestorebranch.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/masking_rules` | [Retrieve masking rules](../getmaskingrules.md) |
| `PATCH` | `/projects/{project_id}/branches/{branch_id}/masking_rules` | [Update masking rules](../updatemaskingrules.md) |
| `POST` | `/projects/{project_id}/branches/{branch_id}/restore` | [Restore branch to a historical state](../restoreprojectbranch.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/roles` | [List roles](../listprojectbranchroles.md) |
| `POST` | `/projects/{project_id}/branches/{branch_id}/roles` | [Create role](../createprojectbranchrole.md) |
| `DELETE` | `/projects/{project_id}/branches/{branch_id}/roles/{role_name}` | [Delete role](../deleteprojectbranchrole.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/roles/{role_name}` | [Retrieve role details](../getprojectbranchrole.md) |
| `POST` | `/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reset_password` | [Reset role password](../resetprojectbranchrolepassword.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reveal_password` | [Retrieve role password](../getprojectbranchrolepassword.md) |
| `GET` | `/projects/{project_id}/branches/{branch_id}/schema` | [Retrieve database schema](../getprojectbranchschema.md) |
| `POST` | `/projects/{project_id}/branches/{branch_id}/set_as_default` | [Set branch as default](../setdefaultprojectbranch.md) |

## Related pages

- [Accept a project transfer request](../acceptprojecttransferrequest.md)
- [Add an OAuth provider](../addneonauthoauthprovider.md)
- [Add an OAuth provider](../addbranchneonauthoauthprovider.md)
- [Add domain to redirect_uri whitelist](../addbranchneonauthtrusteddomain.md)
- [Add JWKS URL](../addprojectjwks.md)
- [Add trusted redirect URI domain](../addneonauthdomaintoredirecturiwhitelist.md)
- [AI Gateway](./ai-gateway.md)
- [API Key](./api-key.md)
- [Assign or update VPC endpoint](../assignorganizationvpcendpoint.md)
- [Auth](./auth.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
