---
title: "Report a commit status (GitHub's body)"
description: "With a member's credential, the status shows that member as\n`creator` and has `app` null, whatever the body says.\n\nWith a status token (`PANDO_STATUS_TOKEN` in a Buildkite build's\nenv, `status_token` in a web hook's payload), Pando stamps `app` from\nthe hook that delivered it (`buildkite`, a web hook's own `app`, or\nnull) and `creator` `app:<slug>` (`hook:<hook id>` when null). A\nstatus token posts statuses for its one commit in its one repo, for\n24 hours, on this route only: no other route and no git.\n"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.gitpando.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Pando API › statuses

`POST /v1/monorepos/{owner}/{monorepo}/repos/{repo}/statuses/{sha}`

With a member's credential, the status shows that member as
`creator` and has `app` null, whatever the body says.

With a status token (`PANDO_STATUS_TOKEN` in a Buildkite build's
env, `status_token` in a web hook's payload), Pando stamps `app` from
the hook that delivered it (`buildkite`, a web hook's own `app`, or
null) and `creator` `app:<slug>` (`hook:<hook id>` when null). A
status token posts statuses for its one commit in its one repo, for
24 hours, on this route only: no other route and no git.

## Authentication

Requires one of the following:

- `credential`, http, header `Authorization`
- `session`, apiKey, in cookie
- `statusToken`, http, header `Authorization`

## Path parameters

- `createStatus.path.owner` (string, required) — The monorepo's owner, a namespace (a person's login or an organization). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$`
- `createStatus.path.monorepo` (string, required) — The monorepo's name within its owner (or an old name). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9._]|-(?!-)){0,38}$`
- `createStatus.path.repo` (string, required) — The repo's `name` (`projects-web`).
- `createStatus.path.sha` (string, required)

## Request body

_Required._

- `createStatus.state` (string, required)
  - one of `"pending"`, `"success"`, `"failure"`, `"error"`
- `createStatus.context` (string, optional)
  - default `"default"`
- `createStatus.target_url` (string, optional)
- `createStatus.description` (string, optional)

## Example request

```json
{
  "state": "pending",
  "context": "default",
  "target_url": "string",
  "description": "string"
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://app.gitpando.com/v1/monorepos/string/string/repos/string/statuses/string \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "state": "pending",
  "context": "default",
  "target_url": "string",
  "description": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/monorepos/string/string/repos/string/statuses/string';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    state: 'pending',
    context: 'default',
    target_url: 'string',
    description: 'string'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.gitpando.com/v1/monorepos/string/string/repos/string/statuses/string"

payload = {
    "state": "pending",
    "context": "default",
    "target_url": "string",
    "description": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

Created

#### Example

```json
{
  "sha": "string",
  "context": "string",
  "state": "pending",
  "target_url": "string",
  "description": "string",
  "creator": "string",
  "app": "string",
  "created_at": "2019-08-24T14:15:22Z"
}
```

- `createStatus.response.201.sha` (string, required)
- `createStatus.response.201.context` (string, required)
- `createStatus.response.201.state` (string, required)
  - one of `"pending"`, `"success"`, `"failure"`, `"error"`
- `createStatus.response.201.created_at` (string, required)
  - format `date-time`
- `createStatus.response.201.target_url` (string | null, optional)
- `createStatus.response.201.description` (string | null, optional)
- `createStatus.response.201.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
- `createStatus.response.201.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.

### 401

`unauthorized`: not a credential, or a status token that is not valid. `status_token_expired`: older than 24 hours. `status_tokens_off`: the Worker secret PANDO_STATUS_SECRET is not set.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `createStatus.response.401.error` (object, required)
  - `createStatus.response.401.error.code` (string, required)
  - `createStatus.response.401.error.message` (string, required)
  - `createStatus.response.401.error.paths` (array<string>, optional)
  - `createStatus.response.401.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `createStatus.response.401.error.checks.sha` (string | null, required)
    - `createStatus.response.401.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `createStatus.response.401.error.checks.required` (array | null, required) — Null while unknown.
    - `createStatus.response.401.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `createStatus.response.401.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `createStatus.response.401.error.checks.statuses.sha` (string, required)
      - `createStatus.response.401.error.checks.statuses.context` (string, required)
      - `createStatus.response.401.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `createStatus.response.401.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `createStatus.response.401.error.checks.statuses.target_url` (string | null, optional)
      - `createStatus.response.401.error.checks.statuses.description` (string | null, optional)
      - `createStatus.response.401.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `createStatus.response.401.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `createStatus.response.401.error.checks.missing` (array<string>, optional)

### 403

`status_token_scope`: the token is for another commit, repo or monorepo. `status_token_route` (on any other route): a status token works here only.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `createStatus.response.403.error` (object, required)
  - `createStatus.response.403.error.code` (string, required)
  - `createStatus.response.403.error.message` (string, required)
  - `createStatus.response.403.error.paths` (array<string>, optional)
  - `createStatus.response.403.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `createStatus.response.403.error.checks.sha` (string | null, required)
    - `createStatus.response.403.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `createStatus.response.403.error.checks.required` (array | null, required) — Null while unknown.
    - `createStatus.response.403.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `createStatus.response.403.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `createStatus.response.403.error.checks.statuses.sha` (string, required)
      - `createStatus.response.403.error.checks.statuses.context` (string, required)
      - `createStatus.response.403.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `createStatus.response.403.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `createStatus.response.403.error.checks.statuses.target_url` (string | null, optional)
      - `createStatus.response.403.error.checks.statuses.description` (string | null, optional)
      - `createStatus.response.403.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `createStatus.response.403.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `createStatus.response.403.error.checks.missing` (array<string>, optional)


Source: https://docs.gitpando.com/api/statuses/createStatus/index.md
