---
title: "Start the housekeeping task for a project"
method: POST
path: "/api/v4/projects/{id}/housekeeping"
tags: ["projects"]
---

# Start the housekeeping task for a project

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

## Request

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

Starts the housekeeping task for a project.

## Path parameters

- `id` string, required

## Request body

- PostApiV4ProjectsIdHousekeeping: Start the housekeeping task for a project
  - `task` 'eager' | 'prune': `prune` to trigger manual prune of unreachable objects or `eager` to trigger eager housekeeping.

## Response `201`

Start the housekeeping task for a project

## Other responses

- `401`: Unauthorized
- `403`: Unauthenticated
- `409`: Conflict

---

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