---
title: "Make a release (published at once unless draft)"
description: "Its commit: the tag's when the tag exists, else `target` (a commit on\nmain, or main), else main's head. A commit not on main is refused\n(422 not_on_main). Unless `draft`, it is published at once by the\npublish rule, and refused (412 checks_not_green) before anything is\nmade. `generate_notes` appends notes written from the merges since\nthe last published release. The tag `latest` is refused.\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 › releases

`POST /v1/monorepos/{owner}/{monorepo}/repos/{repo}/releases`

Its commit: the tag's when the tag exists, else `target` (a commit on
main, or main), else main's head. A commit not on main is refused
(422 not_on_main). Unless `draft`, it is published at once by the
publish rule, and refused (412 checks_not_green) before anything is
made. `generate_notes` appends notes written from the merges since
the last published release. The tag `latest` is refused.

## Authentication

Requires one of the following:

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

## Path parameters

- `createRelease.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}$`
- `createRelease.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}$`
- `createRelease.path.repo` (string, required) — The repo's `name` (`projects-web`).

## Request body

_Required._

- `createRelease.tag` (string, required)
- `createRelease.target` (string, optional)
- `createRelease.title` (string, optional) — At most 200 characters; default: the tag.
- `createRelease.notes` (string, optional)
- `createRelease.generate_notes` (boolean, optional)
- `createRelease.draft` (boolean, optional)
  - default `false`
- `createRelease.force` (boolean, optional)
  - default `false`

## Example request

```json
{
  "tag": "string",
  "target": "string",
  "title": "string",
  "notes": "string",
  "generate_notes": true,
  "draft": false,
  "force": false
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://app.gitpando.com/v1/monorepos/string/string/repos/string/releases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tag": "string",
  "target": "string",
  "title": "string",
  "notes": "string",
  "generate_notes": true,
  "draft": false,
  "force": false
}
'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/monorepos/string/string/repos/string/releases';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    tag: 'string',
    target: 'string',
    title: 'string',
    notes: 'string',
    generate_notes: true,
    draft: false,
    force: false
  })
};

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/releases"

payload = {
    "tag": "string",
    "target": "string",
    "title": "string",
    "notes": "string",
    "generate_notes": True,
    "draft": False,
    "force": False
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 201

Made

#### Example

```json
{
  "repo": "string",
  "tag": "string",
  "sha": "string",
  "title": "string",
  "notes": "string",
  "draft": true,
  "forced": true,
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "published_by": "string",
  "published_at": "2019-08-24T14:15:22Z",
  "files": [
    {
      "name": "string",
      "size": 0,
      "sha256": "string",
      "content_type": "string",
      "uploaded_by": "string",
      "uploaded_at": "2019-08-24T14:15:22Z"
    }
  ],
  "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"
      }
    ]
  }
}
```

- `createRelease.response.201.repo` (string, required)
- `createRelease.response.201.tag` (string, required)
- `createRelease.response.201.sha` (string, required) — Its commit
- `createRelease.response.201.title` (string, required)
- `createRelease.response.201.notes` (string, required) — Markdown
- `createRelease.response.201.draft` (boolean, required)
- `createRelease.response.201.forced` (boolean, required) — Published past red or missing required checks.
- `createRelease.response.201.created_by` (string, required)
- `createRelease.response.201.created_at` (string, required)
  - format `date-time`
- `createRelease.response.201.updated_at` (string, required)
  - format `date-time`
- `createRelease.response.201.published_by` (string | null, required)
- `createRelease.response.201.published_at` (string | null, required)
  - format `date-time`
- `createRelease.response.201.files` (array<object>, required)
  - `createRelease.response.201.files.name` (string, required)
  - `createRelease.response.201.files.size` (integer, required)
  - `createRelease.response.201.files.sha256` (string, required)
  - `createRelease.response.201.files.content_type` (string, required)
  - `createRelease.response.201.files.uploaded_by` (string, required)
  - `createRelease.response.201.files.uploaded_at` (string, required)
    - format `date-time`
- `createRelease.response.201.checks` (object, optional) — Its commit's checks; on getRelease only.
  - `createRelease.response.201.checks.sha` (string | null, required)
  - `createRelease.response.201.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"`
  - `createRelease.response.201.checks.required` (array | null, required) — Null while unknown.
  - `createRelease.response.201.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.
  - `createRelease.response.201.checks.statuses` (array<object>, required) — The latest status per context.
    - `createRelease.response.201.checks.statuses.sha` (string, required)
    - `createRelease.response.201.checks.statuses.context` (string, required)
    - `createRelease.response.201.checks.statuses.state` (string, required)
      - one of `"pending"`, `"success"`, `"failure"`, `"error"`
    - `createRelease.response.201.checks.statuses.created_at` (string, required)
      - format `date-time`
    - `createRelease.response.201.checks.statuses.target_url` (string | null, optional)
    - `createRelease.response.201.checks.statuses.description` (string | null, optional)
    - `createRelease.response.201.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.
    - `createRelease.response.201.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.
  - `createRelease.response.201.checks.missing` (array<string>, optional)


Source: https://docs.gitpando.com/api/releases/createRelease/index.md
