---
title: "Export a project"
method: POST
path: "/api/v4/projects/{id}/export"
tags: ["project_import"]
---

# Export a project

`POST /api/v4/projects/{id}/export`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/export`
- Auth: none declared

Exports a project. Use the `upload` hash parameter to upload the exported project to a web server or any S3-compatible platform.

## Path parameters

- `id` string, required

## Request body

- PostApiV4ProjectsIdExport: Export a project
  - `description` string: Override the project description
  - `upload` object: Object that contains information on the upload
    - `url` string: The URL to upload the project
    - `http_method` 'PUT' | 'POST': HTTP method to upload the exported project
  - `excluded_relations` string[]: List of project relation names to exclude from the export (e.g. ["merge_requests", "issues"])

## Response `202`

Export a project

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `429`: Too many requests
- `503`: Service unavailable

---

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