---
title: "Create a commit status"
method: POST
path: "/repos/{owner}/{repo}/statuses/{sha}"
tags: ["repos"]
---

# Create a commit status

`POST /repos/{owner}/{repo}/statuses/{sha}`

Users with push access in a repository can create commit statuses for a given SHA.

Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error.

## Path parameters

- `owner` string, required
- `repo` string, required
- `sha` string, required

## Request body

- object
  - `state` 'error' | 'failure' | 'pending' | 'success', required — The state of the status.
  - `target_url` string, nullable — The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: `http://ci.example.com/user/repo/build/sha`
  - `description` string, nullable — A short description of the status.
  - `context` string — A string label to differentiate this status from the status of other systems. This field is case-insensitive.

## Response `201`

Response

- Status — The status of a commit.
  - `url` string, required
  - `avatar_url` string, nullable, required
  - `id` integer, required
  - `node_id` string, required
  - `state` string, required
  - `description` string, nullable, required
  - `target_url` string, nullable, required
  - `context` string, required
  - `created_at` string, required
  - `updated_at` string, required
  - `creator` 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

---

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