Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!

Create a release

POST
/repos/{owner}/{repo}/releases
curl --request POST \
--url https://gitea.com/api/v1/repos/example/example/releases \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "body": "example", "draft": true, "name": "example", "prerelease": true, "tag_message": "example", "tag_name": "example", "target_commitish": "example" }'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

Media typeapplication/json

CreateReleaseOption options when creating a release

object
body

The release notes or description

string
draft

Whether to create the release as a draft

boolean
name

The display title of the release

string
prerelease

Whether to mark the release as a prerelease

boolean
tag_message

The message for the git tag

string
tag_name
required
string
target_commitish

The target commitish for the release

string
Examplegenerated
{
"body": "example",
"draft": true,
"name": "example",
"prerelease": true,
"tag_message": "example",
"tag_name": "example",
"target_commitish": "example"
}

Release

Media typeapplication/json

Release represents a repository release

object
assets

The files attached to the release

Array<object>

Attachment a generic attachment

object
browser_download_url

DownloadURL is the URL to download the attachment

string format: uri
created_at
string format: date-time
download_count

DownloadCount is the number of times the attachment has been downloaded

integer format: int64
id

ID is the unique identifier for the attachment

integer format: int64
name

Name is the filename of the attachment

string
size

Size is the file size in bytes

integer format: int64
uuid

UUID is the unique identifier for the attachment file

string
author

User represents a user

object
active

Is user active

boolean
avatar_url

URL to the user’s avatar

string format: uri
created
string format: date-time
description

The user’s description

string
email
string format: email
followers_count

User counts

integer format: int64
following_count
integer format: int64
full_name

The user’s full name

string
html_url

URL to the user’s gitea page

string format: uri
id

The user’s id

integer format: int64
is_admin

Is the user an administrator

boolean
language

User locale

string
last_login
string format: date-time
location

The user’s location

string
login

Login of the user, same as username

string
login_name

Identifier of the user, provided by the external authenticator (if configured)

string
default: empty
prohibit_login

Is user login prohibited

boolean
restricted

Is user restricted

boolean
source_id

The ID of the user’s Authentication Source

integer format: int64
starred_repos_count
integer format: int64
visibility

User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate

string
Allowed values: public limited private
website

The user’s website

string
body

The release notes or description

string
created_at
string format: date-time
draft

Whether the release is a draft

boolean
html_url

The HTML URL to view the release

string format: uri
id

The unique identifier of the release

integer format: int64
name

The display title of the release

string
prerelease

Whether the release is a prerelease

boolean
published_at
string format: date-time
tag_name

The name of the git tag associated with the release

string
tarball_url

The URL to download the tarball archive

string format: uri
target_commitish

The target commitish for the release

string
upload_url

The URL template for uploading release assets

string format: uri
url

The API URL of the release

string format: uri
zipball_url

The URL to download the zip archive

string format: uri
Example
{
"author": {
"login_name": "empty",
"visibility": "public"
}
}

APINotFound is a not found empty response

APIError is error format response

message
string
url
string

APIValidationError is error format response related to input validation

message
string
url
string