GitHub Migrations API

The GitHub Migrations API lets you migrate data to and from GitHub. It supports organization migrations that export repositories and metadata as downloadable archives, source imports that convert repositories from Subversion, Mercurial, or TFS to Git, and user migrations for moving personal repositories between accounts or platforms.

Operations 22

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /orgs/{org}/migrations List an organization's recent migrations · List organization migrations #
Ask an LLM
“What migrations have been run for my organization recently, exports and imports alike?”
“Can I see which organization migration exports are still in progress?”
Tell an agent
List the recent migrations for the {org} organization.
Show the last {per_page} migrations for {org}.
POST /orgs/{org}/migrations Start an organization migration export · Start an organization migration #
Ask an LLM
“How do I export several of my organization's repositories into a migration archive?”
“Can I lock repositories while their organization migration archive is being generated?”
Tell an agent
Start an organization migration for {org} covering the repositories {repositories}.
Export {repositories} from {org} into a migration archive and lock them during the export ({lock_repositories}).
GET /orgs/{org}/migrations/{migration_id} Check an organization migration's status · Get an organization migration status #
Ask an LLM
“Has my organization's migration export finished yet, or is it still exporting?”
“What state is a specific org migration in right now?”
Tell an agent
Get the status of migration {migration_id} for the {org} organization.
Check whether org migration {migration_id} in {org} is exported or failed.
GET /orgs/{org}/migrations/{migration_id}/archive Download an organization migration archive · Download an organization migration archive #
Ask an LLM
“Where do I download the archive once my organization migration is exported?”
“Can I get a download link for a finished org migration archive?”
Tell an agent
Get the download URL for the archive of migration {migration_id} in {org}.
Download the {org} organization's migration archive for migration {migration_id}.
DELETE /orgs/{org}/migrations/{migration_id}/archive Delete an organization migration archive · Delete an organization migration archive #
Ask an LLM
“Can I delete an organization migration archive before the seven-day automatic cleanup?”
“How do I remove an old org export archive I no longer need?”
Tell an agent destructive · confirm first
Delete the archive for migration {migration_id} in the {org} organization.
Remove the {org} org's migration archive from export {migration_id} now instead of waiting seven days.
DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock Unlock a repository locked for migration · Unlock an organization repository #
Ask an LLM
“My repository is still locked after an organization migration; how do I unlock it?”
“What do I do with repos that were locked during an org export once the migration is done?”
Tell an agent destructive · confirm first
Unlock repository {repo_name} that was locked by migration {migration_id} in {org}.
Release the migration lock on {repo_name} in the {org} organization for migration {migration_id}.
GET /orgs/{org}/migrations/{migration_id}/repositories List repositories in an organization migration · List repositories in an organization migration #
Ask an LLM
“Which repositories are included in a given organization migration?”
“Can I check what repos an org export actually covered?”
Tell an agent
List the repositories included in migration {migration_id} for {org}.
Show which repos the {org} organization exported in migration {migration_id}.
GET /repos/{owner}/{repo}/import Get an import status #
PUT /repos/{owner}/{repo}/import Start an import #
PATCH /repos/{owner}/{repo}/import Update an import #
DELETE /repos/{owner}/{repo}/import Cancel an import #
GET /repos/{owner}/{repo}/import/authors Get commit authors #
PATCH /repos/{owner}/{repo}/import/authors/{author_id} Map a commit author #
GET /repos/{owner}/{repo}/import/large_files Get large files #
PATCH /repos/{owner}/{repo}/import/lfs Update Git LFS preference #
GET /user/migrations List my user migrations · List user migrations #
Ask an LLM
“What personal account migrations have I started?”
“Can I see all the user migration exports I've kicked off on GitHub?”
Tell an agent
List all the user migrations I've started.
Show page {page} of my personal account migrations.
POST /user/migrations Start a user migration export · Start a user migration #
Ask an LLM
“How do I export my own personal repositories into a migration archive?”
“Can I exclude git data or metadata when exporting my user account's repos?”
Tell an agent
Start a user migration that exports my repositories {repositories}.
Create a personal migration archive for {repositories} and lock them while exporting ({lock_repositories}).
GET /user/migrations/{migration_id} Get a user migration status #
GET /user/migrations/{migration_id}/archive Download my user migration archive · Download a user migration archive #
Ask an LLM
“Where can I download the tar.gz archive from my personal account migration?”
“What's in a user migration archive once I download it?”
Tell an agent
Get the download link for my user migration archive {migration_id}.
Download the tar.gz from my personal migration {migration_id}.
DELETE /user/migrations/{migration_id}/archive Delete a user migration archive #
DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock Unlock a user repository #
GET /user/migrations/{migration_id}/repositories List repositories in my user migration · List repositories for a user migration #
Ask an LLM
“Which of my repositories were included in a personal account migration?”
“Can I list the repos covered by one of my own user migrations?”
Tell an agent
List the repositories in my user migration {migration_id}.
Show which of my repos personal migration {migration_id} exported.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations
📖
Documentation
https://docs.github.com/en/rest/migrations

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github:github-migrations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

github-migrations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Github Migrations API
  version: 1.1.4
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  x-refined-note:
  - x-github-plan differs across the merged source definitions and was not carried
  - x-github-release differs across the merged source definitions and was not carried
  description: 'Operations tagged migrations across 2 of this provider''s published API definitions: github-openapi.json, github-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.github.com
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:


# --- truncated at 32 KB (195 KB total) ---
# Full source: https://artifacts.apis.io/github/openapi/github-migrations-api-openapi.yml