NuGet Package Publish API

Endpoints for pushing new packages, deleting or unlisting packages, and relisting previously unlisted packages on a NuGet feed.

Operations 3

PUT /package Push a package #
DELETE /package/{id}/{version} Delete or unlist a package #
POST /package/{id}/{version} Relist a package #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nuget-package-publish-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nuget-package-publish-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: NuGet Server Package Publish API
  description: The NuGet Server API is a set of HTTP endpoints used to download packages, fetch metadata, publish new packages, and perform other operations against a NuGet package source. The V3 API uses JSON as its underlying media type and is accessed through a service index located at https://api.nuget.org/v3/index.json, which enumerates all available resources and capabilities. This specification covers the service index and package publish endpoints.
  version: '3.0'
  contact:
    name: NuGet Support
    url: https://github.com/NuGet/Home/issues
  termsOfService: https://www.nuget.org/policies/Terms
  license:
    name: Creative Commons Attribution 4.0
    url: https://creativecommons.org/licenses/by/4.0/
servers:
- url: https://api.nuget.org/v3
  description: NuGet.org V3 API
- url: https://www.nuget.org/api/v2
  description: NuGet.org Package Publish Endpoint
security: []
tags:
- name: Package Publish
  description: Endpoints for pushing new packages, deleting or unlisting packages, and relisting previously unlisted packages on a NuGet feed.
paths:
  /package:
    put:
      operationId: pushPackage
      summary: Push a package
      description: Pushes a new package to the NuGet feed. The request body must be a multipart form data payload where the first item is the raw bytes of the .nupkg file. If a package with the same ID and version already exists, the push will be rejected with a 409 status code.
      tags:
      - Package Publish
      security:
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/XNuGetProtocolVersion'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                package:
                  type: string
                  format: binary
                  description: The .nupkg file to push to the package source.
              required:
              - package
      responses:
        '201':
          description: The package was successfully pushed
        '202':
          description: The package was accepted but processing may still be incomplete
        '400':
          description: The provided package is invalid
        '401':
          description: The provided API key is invalid or missing
        '403':
          description: The action is not allowed with the provided credentials
        '409':
          description: A package with the provided ID and version already exists
  /package/{id}/{version}:
    delete:
      operationId: deletePackage
      summary: Delete or unlist a package
      description: Deletes or unlists a package from the NuGet feed. On nuget.org, this operation unlists the package rather than performing a hard delete. Unlisted packages no longer appear in search results or the web interface but remain available for existing consumers.
      tags:
      - Package Publish
      security:
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/PackageId'
      - $ref: '#/components/parameters/PackageVersion'
      responses:
        '204':
          description: The package was successfully deleted or unlisted
        '401':
          description: The provided API key is invalid or missing
        '403':
          description: The action is not allowed with the provided credentials
        '404':
          description: No package with the provided ID and version exists
    post:
      operationId: relistPackage
      summary: Relist a package
      description: Relists a previously unlisted package, making it visible again in search results. If the package is already listed, the request still succeeds.
      tags:
      - Package Publish
      security:
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/PackageId'
      - $ref: '#/components/parameters/PackageVersion'
      responses:
        '200':
          description: The package is now listed
        '401':
          description: The provided API key is invalid or missing
        '403':
          description: The action is not allowed with the provided credentials
        '404':
          description: No package with the provided ID and version exists
components:
  parameters:
    PackageId:
      name: id
      in: path
      required: true
      description: The ID of the package.
      schema:
        type: string
    PackageVersion:
      name: version
      in: path
      required: true
      description: The version of the package.
      schema:
        type: string
    XNuGetProtocolVersion:
      name: X-NuGet-Protocol-Version
      in: header
      required: false
      description: Required in certain cases on nuget.org to indicate protocol version.
      schema:
        type: string
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-NuGet-ApiKey
      in: header
      description: An API key obtained from the NuGet package source. Required for push, delete, and relist operations.
externalDocs:
  description: NuGet Server API Documentation
  url: https://learn.microsoft.com/en-us/nuget/api/overview