LogoFreestyle
API ReferenceGit

Get repository default branch

Get the default branch name for a repository.

GET
/git/v1/repo/{repo_id}/default-branch

Path Parameters

repo_id*string

The repository ID

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://api.freestyle.sh/git/v1/repo/497f6eca-6276-4993-bfeb-53cbbbba6f08/default-branch"
{
  "defaultBranch": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}

Freestyle AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details with the official documentation.

How can I help?

Ask me about Freestyle while you browse the docs.