---
title: "Start an import"
method: PUT
path: "/repos/{owner}/{repo}/import"
tags: ["migrations"]
deprecated: true
---

# Start an import

`PUT /repos/{owner}/{repo}/import`

> **Deprecated.**

Start a source import to a GitHub repository using GitHub Importer.
Importing into a GitHub repository with GitHub Actions enabled is not supported and will
return a status `422 Unprocessable Entity` response.

> [!WARNING]
> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

## Path parameters

- `owner` string, required
- `repo` string, required

## Request body

- object
  - `vcs_url` string, required — The URL of the originating repository.
  - `vcs` 'subversion' | 'git' | 'mercurial' | 'tfvc' — The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.
  - `vcs_username` string — If authentication is required, the username to provide to `vcs_url`.
  - `vcs_password` string — If authentication is required, the password to provide to `vcs_url`.
  - `tfvc_project` string — For a tfvc import, the name of the project that is being imported.

## Response `201`

Response

- Import — A repository import from an external source.
  - `vcs` string, nullable, required
  - `use_lfs` boolean
  - `vcs_url` string, required — The URL of the originating repository.
  - `svc_root` string
  - `tfvc_project` string
  - `status` 'auth' | 'error' | 'none' | 'detecting' | 'choose' | 'auth_failed' | 'importing' | 'mapping' | 'waiting_to_push' | 'pushing' | 'complete' | 'setup' | 'unknown' | 'detection_found_multiple' | 'detection_found_nothing' | 'detection_needs_auth', required
  - `status_text` string, nullable
  - `failed_step` string, nullable
  - `error_message` string, nullable
  - `import_percent` integer, nullable
  - `commit_count` integer, nullable
  - `push_percent` integer, nullable
  - `has_large_files` boolean
  - `large_files_size` integer
  - `large_files_count` integer
  - `project_choices` object[]
    - `vcs` string
    - `tfvc_project` string
    - `human_name` string
  - `message` string
  - `authors_count` integer, nullable
  - `url` string, uri, required
  - `html_url` string, uri, required
  - `authors_url` string, uri, required
  - `repository_url` string, uri, required
  - `svn_root` string

## Other responses

- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.
- `503` — Unavailable due to service under maintenance.

---

[API](https://skmtc.net/github/apis/rest-api.md) · [All operations](https://skmtc.net/github/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/rest-api/versions/80850db290cd/schema)
