PATCH/repos/{owner}/{repo}/releases/assets/{asset_id}

Update a release asset

Updates the name, label, or state of a release asset in a repository. The authenticated user must have push access to the repository; supply any of name, label, or state that you want to change. The response includes the updated release asset details.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 parameters · 3 body fields
ownerstringrequired
The account that owns the repository; the name is not case-sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case-sensitive.
asset_idintegerrequired
The unique identifier of the release asset to update.

Optional release asset fields to update.

namestringoptional
The file name of the asset.
labelstringoptional
An alternate short description of the asset. Used in place of the filename.
statestringoptional
The state of the release asset.

1 status code
200Returns the updated release asset, including its identifier, name, state, download URL, and other asset details.
urlstringrequired
browser_download_urlstringrequired
idintegerrequired
node_idstringrequired
namestringrequired
The file name of the asset.
labelstringrequired
statestringrequired
State of the release asset.
Allowed:uploadedopen
content_typestringrequired
sizeintegerrequired
digeststringrequired
download_countintegerrequired
created_atstringrequired
updated_atstringrequired
uploaderobjectrequired
A GitHub user.

Error handling

The owner path parameter and repo path parameter must identify the repository, and the asset_id path parameter must identify the release asset. The optional name, label, and state body fields accept string values.