---
title: "Upload a NuGet v2 package file for a project"
method: PUT
path: "/api/v4/projects/{id}/packages/nuget/v2"
tags: ["packages_nuget"]
---

# Upload a NuGet v2 package file for a project

`PUT /api/v4/projects/{id}/packages/nuget/v2`

## Request

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

Uploads a NuGet v2 package file for a specified project.

## Path parameters

- `id` string, required

## Request body

- PutApiV4ProjectsIdPackagesNugetV2: Upload a NuGet v2 package file for a project
  - `package` string, binary, required: The package file to be published (generated by Multipart middleware)

## Response `201`

Upload a NuGet v2 package file for a project

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

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