---
title: "Import GitHub gists into GitLab snippets"
method: POST
path: "/api/v4/import/github/gists"
tags: ["imports"]
---

# Import GitHub gists into GitLab snippets

`POST /api/v4/import/github/gists`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/import/github/gists`
- Auth: none declared

Imports personal GitHub gists into GitLab snippets. You can import gists with up to 10 files. GitHub gists with more than 10 files are skipped. You should manually migrate these GitHub gists. If any gists cannot be imported, an email is sent with a list of gists that were not imported.

## Request body

- PostApiV4ImportGithubGists: Import GitHub gists into GitLab snippets
  - `personal_access_token` string, required: GitHub personal access token

## Response `202`

Import GitHub gists into GitLab snippets

## Other responses

- `401`: Unauthorized
- `422`: Unprocessable Entity
- `429`: Too Many Requests

---

[API](https://skmtc.dev/gitlab/apis/gitlab-api.md) - [All operations](https://skmtc.dev/gitlab/apis/gitlab-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitlab/apis/gitlab-api/revisions/b234947ef3f2?raw)
