Skip to content

Create a new git tag in a repository

POST
/repos/{owner}/{repo}/tags
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

CreateTagOption options when creating a tag

object
message
string
tag_name
required
string
target
string
Example generated
{
"message": "example",
"tag_name": "example",
"target": "example"
}

Tag

Media type application/json

Tag represents a repository tag

object
archive_download_count

TagArchiveDownloadCount counts how many times a archive was downloaded

object
tar_gz
integer format: int64
zip
integer format: int64
commit
CommitMeta contains meta information of a commit in terms of API.
object
created
string format: date-time
sha
string
url
string
id
string
message
string
name
string
tarball_url
string
zipball_url
string
Example generated
{
"archive_download_count": {
"tar_gz": 1,
"zip": 1
},
"commit": {
"created": "2026-04-15T12:00:00Z",
"sha": "example",
"url": "example"
},
"id": "example",
"message": "example",
"name": "example",
"tarball_url": "example",
"zipball_url": "example"
}

APINotFound is a not found error response

Media type application/json
object
errors
Array<string>
message
string
url
string
Example generated
{
"errors": [
"example"
],
"message": "example",
"url": "example"
}

APIEmpty is an empty response

Media type application/json

APIConflict is a conflict empty response

Media type application/json

QuotaExceeded

Media type application/json
message
string
user_id
integer format: int64
username
string

APIValidationError is error format response related to input validation

Media type application/json
object
message
string
url
string
Example generated
{
"message": "example",
"url": "example"
}

APIRepoArchivedError is an error that is raised when an archived repo should be modified

Media type application/json
object
message
string
url
string
Example generated
{
"message": "example",
"url": "example"
}