Skip to content

Create or deprecate an NPM package

PUT
/api/v4/projects/{id}/packages/npm/{package_name}

Creates or deprecates an NPM package for a specified project. Deprecate support was added in GitLab 16.0.

id
required
One of:
string

The ID or URL-encoded path of the project

package_name
required
string

Package name

Media type multipart/form-data
object
file
required

The package file to be published (generated by Multipart middleware)

string format: binary
nullable

OK

Bad Request

Unauthorized

Forbidden

Not Found