---
title: "Review a branch (a comment or an approval; not a gate)"
---

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

`POST /v1/monorepos/{owner}/{monorepo}/repos/{repo}/branches/{branch}/reviews`

## Authentication

Requires one of the following:

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

## Path parameters

- `createReview.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}$`
- `createReview.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}$`
- `createReview.path.repo` (string, required) — The repo's `name` (`projects-web`).
- `createReview.path.branch` (string, required) — The branch name, `/` encoded as `%2F`.

## Request body

_Required._

- `createReview.verdict` (string, required)
  - one of `"comment"`, `"request_changes"`, `"approve"`
- `createReview.body` (string, optional)
- `createReview.head` (string, optional) — The sha reviewed. Defaults to the branch head now.
- `createReview.comments` (array<object>, optional)
  - `createReview.comments.path` (string, required)
  - `createReview.comments.body` (string, required)
  - `createReview.comments.line` (integer, optional) — A line in the new file.
  - `createReview.comments.side` (string, optional)
    - one of `"new"`, `"old"`; default `"new"`

## Example request

```json
{
  "verdict": "comment",
  "body": "string",
  "head": "string",
  "comments": [
    {
      "path": "string",
      "line": 0,
      "side": "new",
      "body": "string"
    }
  ]
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://app.gitpando.com/v1/monorepos/string/string/repos/string/branches/string/reviews \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "verdict": "comment",
  "body": "string",
  "head": "string",
  "comments": [
    {
      "path": "string",
      "line": 0,
      "side": "new",
      "body": "string"
    }
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/monorepos/string/string/repos/string/branches/string/reviews';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    verdict: 'comment',
    body: JSON.stringify('string'),
    head: 'string',
    comments: [{path: 'string', line: 0, side: 'new', body: JSON.stringify('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/branches/string/reviews"

payload = {
    "verdict": "comment",
    "body": "string",
    "head": "string",
    "comments": [
        {
            "path": "string",
            "line": 0,
            "side": "new",
            "body": "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
{
  "id": "string",
  "branch": "string",
  "head": "string",
  "verdict": "comment",
  "body": "string",
  "comments": [
    {
      "path": "string",
      "line": 0,
      "side": "new",
      "body": "string"
    }
  ],
  "author": "string",
  "created_at": "2019-08-24T14:15:22Z"
}
```

- `createReview.response.201.id` (string, required)
- `createReview.response.201.branch` (string, required)
- `createReview.response.201.head` (string, required)
- `createReview.response.201.verdict` (string, required)
  - one of `"comment"`, `"request_changes"`, `"approve"`
- `createReview.response.201.author` (string, required)
- `createReview.response.201.created_at` (string, required)
  - format `date-time`
- `createReview.response.201.body` (string | null, optional)
- `createReview.response.201.comments` (array<object>, optional)
  - `createReview.response.201.comments.path` (string, required)
  - `createReview.response.201.comments.body` (string, required)
  - `createReview.response.201.comments.line` (integer, optional) — A line in the new file.
  - `createReview.response.201.comments.side` (string, optional)
    - one of `"new"`, `"old"`; default `"new"`


Source: https://docs.gitpando.com/api/reviews/createReview/index.md
