Skip to main content
POST
/
api
/
repos
curl --request POST \ --url https://api.{cluster}.code.storage/api/repos \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "default_branch": "main" } '
{
  "http_url": "https://git.code.storage/pierre/sdk-documentation",
  "message": "repository created",
  "repo_id": "repo_7f2b3d9"
}

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.

Query Parameters

default_branch
string

Optional default branch override. When present, it is used if the request body does not already specify one.

Body

application/json

Create either an empty repository, a synced repository backed by an upstream provider, or a fork of another Code Storage repository.

Create-repository request body. The repository identity comes from the JWT repo claim; the body supplies optional default-branch and Git Sync or fork configuration.

base_repo
object

Optional upstream or fork source configuration.

default_branch
string

Default branch for the new repository. Defaults to main when omitted.

Example:

"main"

Response

Repository created successfully.

Result of creating a repository, including the assigned internal repository ID and the repository URL path.

http_url
string
required

HTTP remote URL for the new repository.

Example:

"https://git.code.storage/pierre/sdk-documentation"

message
string
required

High-level creation result.

Example:

"repository created"

repo_id
string
required

Stable repository identifier.

Example:

"repo_7f2b3d9"