Update Repository Settings
Change the default branch of the repository identified by the JWT repo claim.
The gateway reads the current HEAD symbolic ref, then repoints it at the requested branch through a transactional compare-and-swap against that value, and finally records the new default branch in the repository row. Branch names are fully qualified for you: main is written as the symref target refs/heads/main, and a value that already starts with refs/ is used verbatim. The branch itself is not created by this call.
JWT claims
Required scopes: repo:write
Requires per repo scope: Yes
Deprecated: Use /api/repos/{repo_name} instead.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Repository settings to change. default_branch is the only supported field and must be a non-empty branch name.
Repository settings to patch, such as the default branch.
New default branch name for the Code Storage repository.
"main"
Response
Default branch updated. Returns the repository ID, its URL path, and the branch name now recorded as the default.