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 11

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 · GitHub 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 · GitHub 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 · GitHub 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 · GitHub 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 · GitHub 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 · GitHub 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 · GitHub 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 /user/migrations List my user migrations · GitHub 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 · GitHub 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}/archive Download my user migration archive · GitHub 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}.
GET /user/migrations/{migration_id}/repositories List repositories in my user migration · GitHub 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

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-migrations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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:
  version: 1.1.4
  title: GitHub v3 REST Migrations API
  description: GitHub's v3 REST API.
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- 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 (106 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-migrations-api-openapi.yml