Skip to main content
PATCH
Yank a release or undo a yank

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

owner
string
required

Owning user or team slug

Required string length: 1 - 255
name
string
required

Package name

Required string length: 1 - 255
version
string
required

An exact PEP 440 version, every upload of it if the number was reused in the past, or sha256: plus at least 12 hex digits of the content hash. Never a ref name: a mutable pointer shouldn't choose what changes

Required string length: 1 - 255

Body

application/json
yanked
boolean
required

True to yank (PEP 592), false to undo it, which clears the reason

yank_reason
string | null

Why, shown to installers; only with yanked: true

Maximum string length: 500

Response

Successful Response

id
string
required

The release id: the id of its source artifact

version
string | null
required

Semantic version; null for releases pushed without one

display_version
string | null
required

version, or failing that the version in the upload's metadata

content_hash
string
required
framework
enum<string>
required

The verifiers API the release targets

Available options:
v0,
v1,
unknown
created_at
string<date-time>
required
source
ReleaseArtifact · object
required
wheel
ReleaseArtifact · object | null
required

Null for a release with no uploaded wheel, such as most forks

index_status
enum<string> | null
required

State of the file index; null if indexing never started

Available options:
processing,
completed,
failed
pushed_by
Pusher · object | null
required
refs
string[]
required

Refs pointing here. latest is computed, not the stored ref

yanked
boolean
default:false

Out of latest and default listings, but still resolvable by exact version, so runs that pinned it reproduce

yank_reason
string | null

Why it was yanked, if given

metadata
Metadata · object

What the upload declared about itself