# PyPI Upload API

**Canonical:** https://apis.io/apis/pypi/upload/  
**Provider:** PyPI — https://apis.io/providers/pypi/  
**Documentation:** https://docs.pypi.org/api/upload/

PyPI Upload API is one of 6 APIs that [PyPI](https://apis.io/providers/pypi/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Packages, Publishing, Python, and Upload. The published artifact set on APIs.io includes API documentation and an OpenAPI specification.

The PyPI Upload API is the endpoint used by tools like twine and build frontends to publish Python package distributions to the Python Package Index. Served at upload.pypi.org, it emulates the legacy PyPI upload interface and accepts source distributions and wheel files along with their metadata. The API also supports attaching PEP 740 digital attestations to uploads, which PyPI will verify before accepting. Authentication is handled via API tokens or Trusted Publishing workflows using OpenID Connect.

## Machine-readable artifacts (2)

- **Documentation** — https://docs.pypi.org/api/upload/
- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/pypi/refs/heads/main/openapi/pypi-upload-api-openapi.yml

## Other PyPI APIs (5)

- [PyPI Index API](https://apis.io/apis/pypi/index/)
- [PyPI RSS Feeds](https://apis.io/apis/pypi/feeds/)
- [PyPI Downloads API](https://apis.io/apis/pypi/pypi-downloads-api/)
- [PyPI Projects API](https://apis.io/apis/pypi/pypi-projects-api/)
- [PyPI Provenance API](https://apis.io/apis/pypi/pypi-provenance-api/)

## Tags

Packages, Publishing, Python, Upload

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/pypi/upload/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/pypi/.
