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

# POST /api/repo/import

`POST /api/repo/import`

## Request body

- ImportJsonRequest
  - `description` string, required — Short description of the repository
  - `mirror` boolean, nullable — Set to true to mirror the repository
  - `name` string, required — Repository name
  - `namespace` string, required — Namespace (username or org name) under which the imported repo should be created
  - `password` string, nullable — Password for authenticating with the remote
  - `url` string, uri, required — URL of the remote repository to import
  - `username` string, nullable — Username for authenticating with the remote
  - `visibility` 'public' | 'internal' | 'private', required

## Response `200`

Repository import queued 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, description, or import URL
- `401` — Authentication required
- `409` — Repository name already in use
- `501` — Importing is disabled on this instance

---

[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)
