LogoFreestyle
API Reference/Git

Create a repository

Create a repository. Once the repository is created, it will also be created on the Git server. The repository name must be unique within your account. Once created, you can then push your code to this repository. The repo will be available at `git.freestyle.sh/{repo-id}`

POST/git/v1/repo

Request Body

application/jsonRequired
namestring | null

This name is not visible to users, and is only accessible to you via API and in the dashboard. Mostly useful for observability.

publicboolean
Default: false
sourceSource
curl -X POST "https://api.freestyle.sh/git/v1/repo" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "public": false,
    "source": {
      "url": "http://example.com",
      "branch": "string",
      "depth": 0,
      "type": "git"
    }
  }'

Repository created successfully

{
  "repoId": "string"
}