Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
This is the documentation of the next version, still under development. See the latest release.

Create a commit status

POST
/repos/{owner}/{repo}/statuses/{sha}
curl --request POST \
--url https://gitea.com/api/v1/repos/example/example/statuses/example \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "context": "example", "description": "example", "state": "pending", "target_url": "https://example.com" }'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

sha
required
string

Sha of the commit

Media typeapplication/json

CreateStatusOption holds the information needed to create a new CommitStatus for a Commit

object
context

Context is the unique context identifier for the status

string
description

Description provides a brief description of the status

string
state

State represents the status state to set (pending, success, error, failure)

string
Allowed values: pending success error failure warning skipped
target_url

TargetURL is the URL to link to for more details

string format: uri

CommitStatus

Media typeapplication/json

CommitStatus holds a single status of a single Commit

object
context

Context is the unique context identifier for the status

string
created_at
string format: date-time
creator

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
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

string
Allowed values: public limited private
website

The user’s website

string
description

Description provides a brief description of the status

string
id

ID is the unique identifier for the commit status

integer format: int64
status

State represents the status state (pending, success, error, failure)

string
Allowed values: pending success error failure warning skipped
target_url

TargetURL is the URL to link to for more details

string format: uri
updated_at
string format: date-time
url

URL is the API URL for this status

string format: uri
Example
{
"creator": {
"visibility": "public"
},
"status": "pending"
}

APIError is error format response

message
string
url
string

APINotFound is a not found empty response