---
title: "Create a repo"
method: POST
path: "/repos"
tags: ["Repository Management"]
---

# Create a repo

`POST /repos`

Create an empty repo

## Request body

- object
  - `repo_name` string, required
  - `description` string
  - `organization_id` string — The ID of the organization to associate the repo with. If not provided, the system will use the user's organization if they belong to exactly one.
  - `branchless` boolean

## Response `201`

The newly created repo object

- Repo
  - `repo_name` string, required
  - `description` string
  - `organization_id` string — The ID of the organization to associate the repo with. If not provided, the system will use the user's organization if they belong to exactly one.
  - `repo_id` string, required
  - `default_branch_id` string
  - `default_branch_name` string
  - `size_bytes` number, float, required
  - `owner_user_id` string, required
  - `created_timestamp` integer, required — Seconds since epoch UTC
  - `sync_git_repo_url` string — Optional URL of the git repository being synced with the repo
  - `sync_git_level` 1 | 2 | 3 | 4 — One of: 1 - latest commit of default branch, 2 - default branch with history, 3 - full repo with history, 4 - full repo with history and sync [default]
  - `digest_method` 'sha1' | 'md5' — The method used to calculate the digest of BLOBs in the repo.
  - `def_auto_forwarding_enabled` boolean

## Other responses

- `409` — An error occurred
- `default` — An error occurred

---

[API](https://skmtc.net/diversion/apis/diversion-core-api.md) · [All operations](https://skmtc.net/diversion/apis/diversion-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/diversion/diversion-core-api/revisions/38a18aba804b/schema)
