v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
repos

Update a release

Users with push access to the repository can edit a release.

[!NOTE] If the resolved target commit (the new value of target_commitish if you are changing it, otherwise the existing target) adds or modifies any file under .github/workflows/ relative to the repository's default branch, the authenticating token must be authorized to modify workflows. Otherwise, this endpoint returns 404 Not Found; some authentication paths surface 403 Resource not accessible by integration instead.

OAuth app tokens and personal access tokens (classic) need the workflow scope when the resolved target commit modifies workflow files. Fine-grained access tokens and GitHub App installation tokens also need the "Workflows" repository permission (write). The GITHUB_TOKEN available to GitHub Actions cannot be authorized for this; for more information, see "Automatic token authentication".

patch/repos/{owner}/{repo}/releases/{release_id}

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

release_idinteger required

The unique identifier of the release.

Request body

tag_namestring

The name of the tag.

target_commitishstring

Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch.

namestring

The name of the release.

bodystring

Text describing the contents of the tag.

draftboolean

true makes the release a draft, and false publishes the release.

prereleaseboolean

true to identify the release as a prerelease, false to identify the release as a full release.

make_latest'true' | 'false' | 'legacy'

Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to true for newly published releases. legacy specifies that the latest release should be determined based on the release creation date and higher semantic version.

discussion_category_namestring

If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "Managing categories for discussions in your repository."

Response

Response

urlstring uri required
html_urlstring uri required
assets_urlstring uri required
upload_urlstring required
tarball_urlstring uri nullable required
zipball_urlstring uri nullable required
idinteger required
node_idstring required
tag_namestring required

The name of the tag.

target_commitishstring required

Specifies the commitish value that determines where the Git tag is created from.

namestring nullable required
bodystring nullable
draftboolean required

true to create a draft (unpublished) release, false to create a published one.

prereleaseboolean required

Whether to identify the release as a prerelease or a full release.

immutableboolean

Whether or not the release is immutable.

created_atstring date-time required
published_atstring date-time nullable required
updated_atstring date-time nullable
body_htmlstring
body_textstring
mentions_countinteger
discussion_urlstring uri

The URL of the release discussion.

Example response

{
  "tag_name": "v1.0.0",
  "target_commitish": "master",
  "author": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "starred_at": "\"2020-07-09T00:17:55Z\"",
    "user_view_type": "public"
  },
  "assets": [
    {
      "name": "Team Environment",
      "uploader": {
        "login": "octocat",
        "id": 1,
        "node_id": "MDQ6VXNlcjE=",
        "avatar_url": "https://github.com/images/error/octocat_happy.gif",
        "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
        "url": "https://api.github.com/users/octocat",
        "html_url": "https://github.com/octocat",
        "followers_url": "https://api.github.com/users/octocat/followers",
        "following_url": "https://api.github.com/users/octocat/following{/other_user}",
        "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
        "organizations_url": "https://api.github.com/users/octocat/orgs",
        "repos_url": "https://api.github.com/users/octocat/repos",
        "events_url": "https://api.github.com/users/octocat/events{/privacy}",
        "received_events_url": "https://api.github.com/users/octocat/received_events",
        "type": "User",
        "starred_at": "\"2020-07-09T00:17:55Z\"",
        "user_view_type": "public"
      }
    }
  ]
}