---
title: "Update a release"
method: PATCH
path: "/repos/{owner}/{repo}/releases/{release_id}"
tags: ["repos"]
---

# Update a release

`PATCH /repos/{owner}/{repo}/releases/{release_id}`

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](https://docs.github.com/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)".

## Path parameters

- `owner` string, required
- `repo` string, required
- `release_id` integer, required

## Request body

- object
  - `tag_name` string — The name of the tag.
  - `target_commitish` string — 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.
  - `name` string — The name of the release.
  - `body` string — Text describing the contents of the tag.
  - `draft` boolean — `true` makes the release a draft, and `false` publishes the release.
  - `prerelease` boolean — `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_name` string — 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](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)."

## Response `200`

Response

- Release — A release.
  - `url` string, uri, required
  - `html_url` string, uri, required
  - `assets_url` string, uri, required
  - `upload_url` string, required
  - `tarball_url` string, uri, nullable, required
  - `zipball_url` string, uri, nullable, required
  - `id` integer, required
  - `node_id` string, required
  - `tag_name` string, required — The name of the tag.
  - `target_commitish` string, required — Specifies the commitish value that determines where the Git tag is created from.
  - `name` string, nullable, required
  - `body` string, nullable
  - `draft` boolean, required — true to create a draft (unpublished) release, false to create a published one.
  - `prerelease` boolean, required — Whether to identify the release as a prerelease or a full release.
  - `immutable` boolean — Whether or not the release is immutable.
  - `created_at` string, date-time, required
  - `published_at` string, date-time, nullable, required
  - `updated_at` string, date-time, nullable
  - `author` SimpleUser, required — A GitHub user.
    - `name` string, nullable
    - `email` string, nullable
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `starred_at` string
    - `user_view_type` string
  - `assets` ReleaseAsset[], required
    - `url` string, uri, required
    - `browser_download_url` string, uri, required
    - `id` integer, required
    - `node_id` string, required
    - `name` string, required — The file name of the asset.
    - `label` string, nullable, required
    - `state` 'uploaded' | 'open', required — State of the release asset.
    - `content_type` string, required
    - `size` integer, required
    - `digest` string, nullable, required
    - `download_count` integer, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `uploader` NullableSimpleUser, nullable, required — A GitHub user.
      - `name` string, nullable
      - `email` string, nullable
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `avatar_url` string, uri, required
      - `gravatar_id` string, nullable, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `followers_url` string, uri, required
      - `following_url` string, required
      - `gists_url` string, required
      - `starred_url` string, required
      - `subscriptions_url` string, uri, required
      - `organizations_url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, required
      - `received_events_url` string, uri, required
      - `type` string, required
      - `site_admin` boolean, required
      - `starred_at` string
      - `user_view_type` string
  - `body_html` string
  - `body_text` string
  - `mentions_count` integer
  - `discussion_url` string, uri — The URL of the release discussion.
  - `reactions` ReactionRollup
    - `url` string, uri, required
    - `total_count` integer, required
    - `+1` integer, required
    - `-1` integer, required
    - `laugh` integer, required
    - `confused` integer, required
    - `heart` integer, required
    - `hooray` integer, required
    - `eyes` integer, required
    - `rocket` integer, required

## Other responses

- `404` — Not Found if the discussion category name is invalid

---

[API](https://skmtc.net/github/apis/github-v3-rest-api.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api/versions/a367f7028301/schema)
