---
title: "POST /api/repo"
method: POST
path: "/api/repo"
tags: ["repository"]
---

# POST /api/repo

`POST /api/repo`

## Request body

- CreateJsonRequest
  - `defaultBranch` string, required — Default branch for repository
  - `description` string, required — Short description of the repository
  - `gitignore` string, nullable — Optional: initialize a .gitignore file with the chosen template
  - `license` string, nullable — Optional: initialioze a LICENSE.txt file with the chosen license
  - `name` string, required — Repository name
  - `namespace` string, required — Namespace (username or org name) under which the repo should be created
  - `readme` boolean, nullable — Optional: initialise a README.md with the repo name and description
  - `visibility` 'public' | 'internal' | 'private', required

## Response `200`

Repository created successfully

- CreateJsonResponse
  - `id` string, uuid, required — Internal ID of the newly created repository
  - `url` string, required — Full URL to the repository

## Other responses

- `400` — Invalid repository name or description
- `401` — Authentication required
- `409` — Repository name already in use

---

[API](https://skmtc.dev/mari/apis/gitarena.md) · [All operations](https://skmtc.dev/mari/apis/gitarena/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mari/gitarena/revisions/b3640d5600df/schema)
