Skip to main content
PATCH
/
api
/
v1
/
repo
Update Repo
curl --request PATCH \
  --url https://api.{cluster}.code.storage/api/v1/repo \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "default_branch": "main"
}
'
{
  "default_branch": "main",
  "id": "repo_7f2b3d9",
  "url": "pierre/sdk-documentation"
}

Documentation Index

Fetch the complete documentation index at: https://code.storage/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Repository settings to patch, such as the default branch.

default_branch
string

New default branch name for the Code Storage repository.

Example:

"main"

Response

Success

Repository state after applying the patch.

default_branch
string
required

Updated default branch name.

Example:

"main"

id
string
required

Internal repository ID.

Example:

"repo_7f2b3d9"

url
string
required

Repository URL path. Matches the JWT repo claim.

Example:

"pierre/sdk-documentation"