---
title: "Upload the maven package file"
method: PUT
path: "/api/v4/projects/{id}/packages/maven/*path/{file_name}"
tags: ["packages"]
---

# Upload the maven package file

`PUT /api/v4/projects/{id}/packages/maven/*path/{file_name}`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/packages/maven/*path/{file_name}`
- Auth: none declared

This feature was introduced in GitLab 11.3

## Path parameters

- `id` string, required
- `file_name` string, required

## Request body

- PutApiV4ProjectsIdPackagesMavenPathFileName: Upload the maven package file
  - `path` string, required: Package path
  - `file` string, binary, required: The package file to be published (generated by Multipart middleware)

## Response `200`

Upload the maven package file

## Other responses

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

---

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