---
title: "POST /api/v1/github/repositories/branches"
method: POST
path: "/api/v1/github/repositories/branches"
---

# POST /api/v1/github/repositories/branches

`POST /api/v1/github/repositories/branches`

## Request

- Base URL: `https://falconer.com` (the document declares no server; this is the origin it was published from)
- URL: `https://falconer.com/api/v1/github/repositories/branches`
- Auth: none declared

## Headers

- `x-organization-id` string: Required when using OAuth bearer tokens.

## Request body

- CreateGithubBranchRequest
  - `repository` string, required: owner/repo
  - `baseBranch` string, required
  - `name` string, required

## Response `201`

Branch created.

- GithubBranch
  - `name` string, required
  - `baseBranch` string, required

## Other responses

- `400`: Bad request, or a folder that is not the sync root
- `403`: Permission is missing
- `404`: Folder or repository not found
- `409`: The branch already exists
- `412`: Connect a personal GitHub account with the repo scope

---

[API](https://skmtc.dev/falconer/apis/falconer-public-api.md) · [All operations](https://skmtc.dev/falconer/apis/falconer-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/falconer/apis/falconer-public-api/revisions/7b303b7ddf6a?raw)
