Skip to main content

Create a release

Users with push access to the repository can create a release. This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/[email protected]/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/[email protected]/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.

POST/repos/{owner}/{repo}/releases
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
owner string
required
repo string
required
Body Params
required
application/jsonobject
body string
optional

Text describing the contents of the tag.

draft boolean
optional

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

name string
optional

The name of the release.

prerelease boolean
optional

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

tag_name string
required

The name of the tag.

target_commitish string
optional

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 (usually `master`).

Responses

application/json Release object

Response

Headers
Location string

Example: https://api.github.com/repos/octocat/Hello-World/releases/1

assets array[Release Asset object]
required
items Release Asset object

Data related to a release.

browser_download_url string<uri>
required
content_type string
required
created_at string<date-time>
required
download_count integer
required
id integer
required
label string
requirednullable
name string
required

The file name of the asset.

Example: Team Environment

node_id string
required
size integer
required
state string
required

State of the release asset.

updated_at string<date-time>
required
uploader Simple User object
requirednullable

Simple User

avatar_url string<uri>
required

Example: https://github.com/images/error/octocat_happy.gif

email string
optionalnullable
events_url string
required

Example: https://api.github.com/users/octocat/events{/privacy}

followers_url string<uri>
required

Example: https://api.github.com/users/octocat/followers

following_url string
required

Example: https://api.github.com/users/octocat/following{/other_user}

gists_url string
required

Example: https://api.github.com/users/octocat/gists{/gist_id}

gravatar_id string
requirednullable

Example: 41d064eb2195891e12d0413f63227ea7

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

login string
required

Example: octocat

name string
optionalnullable
node_id string
required

Example: MDQ6VXNlcjE=

organizations_url string<uri>
required

Example: https://api.github.com/users/octocat/orgs

received_events_url string<uri>
required

Example: https://api.github.com/users/octocat/received_events

repos_url string<uri>
required

Example: https://api.github.com/users/octocat/repos

site_admin boolean
required
starred_at string
optional

Example: "2020-07-09T00:17:55Z"

starred_url string
required

Example: https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_url string<uri>
required

Example: https://api.github.com/users/octocat/subscriptions

type string
required

Example: User

url string<uri>
required

Example: https://api.github.com/users/octocat

url string<uri>
required
assets_url string<uri>
required
author Simple User object
required

Simple User

avatar_url string<uri>
required

Example: https://github.com/images/error/octocat_happy.gif

email string
optionalnullable
events_url string
required

Example: https://api.github.com/users/octocat/events{/privacy}

followers_url string<uri>
required

Example: https://api.github.com/users/octocat/followers

following_url string
required

Example: https://api.github.com/users/octocat/following{/other_user}

gists_url string
required

Example: https://api.github.com/users/octocat/gists{/gist_id}

gravatar_id string
requirednullable

Example: 41d064eb2195891e12d0413f63227ea7

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

login string
required

Example: octocat

name string
optionalnullable
node_id string
required

Example: MDQ6VXNlcjE=

organizations_url string<uri>
required

Example: https://api.github.com/users/octocat/orgs

received_events_url string<uri>
required

Example: https://api.github.com/users/octocat/received_events

repos_url string<uri>
required

Example: https://api.github.com/users/octocat/repos

site_admin boolean
required
starred_at string
optional

Example: "2020-07-09T00:17:55Z"

starred_url string
required

Example: https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_url string<uri>
required

Example: https://api.github.com/users/octocat/subscriptions

type string
required

Example: User

url string<uri>
required

Example: https://api.github.com/users/octocat

body string
optionalnullable
body_html string
optional
body_text string
optional
created_at string<date-time>
required
draft boolean
required

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

Example: false

html_url string<uri>
required
id integer
required
name string
requirednullable
node_id string
required
prerelease boolean
required

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

Example: false

published_at string<date-time>
requirednullable
reactions Reaction Rollup object
optional
+1 integer
required
-1 integer
required
confused integer
required
eyes integer
required
heart integer
required
hooray integer
required
laugh integer
required
rocket integer
required
total_count integer
required
url string<uri>
required
tag_name string
required

The name of the tag.

Example: v1.0.0

tarball_url string<uri>
requirednullable
target_commitish string
required

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

Example: master

upload_url string
required
url string<uri>
required
zipball_url string<uri>
requirednullable
application/json Validation Error object

Validation failed

documentation_url string
required
errors array[object]
optional
items object
code string
required
field string
optional
index integer
optional
message string
optional
resource string
optional
value
optional
message string
required