# Review Policy

Source: https://opvs.ai/docs/api/review-policy

## `GET` /api/v1/projects/{project_id}/review-policy

**Get Project Policy**

**Parameters**

- `project_id` (path, string, required)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/projects/{project_id}/review-policy' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/projects/{project_id}/review-policy",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/projects/{project_id}/review-policy", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/projects/{project_id}/review-policy", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `PUT` /api/v1/projects/{project_id}/review-policy

**Put Project Policy**

**Parameters**

- `project_id` (path, string, required)

**Request body**

```bash
curl -X PUT 'https://app.opvs.ai/api/v1/projects/{project_id}/review-policy' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "ai_reviewer_mode": "forbidden",
  "ai_graduation": {
    "rule": null,
    "agree_streak": 30
  },
  "levels": {},
  "merges_alone": {},
  "required_checks": [
    "string"
  ],
  "template_key": "string",
  "template_version": "string",
  "repo_file_path": "string",
  "repo_file_sha": "string"
}'
```

```python
import httpx

resp = httpx.put(
    "https://app.opvs.ai/api/v1/projects/{project_id}/review-policy",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"ai_reviewer_mode": "forbidden", "ai_graduation": {"rule": null, "agree_streak": 30}, "levels": {}, "merges_alone": {}, "required_checks": ["string"], "template_key": "string", "template_version": "string", "repo_file_path": "string", "repo_file_sha": "string"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/projects/{project_id}/review-policy", {
  method: "PUT",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"ai_reviewer_mode": "forbidden", "ai_graduation": {"rule": null, "agree_streak": 30}, "levels": {}, "merges_alone": {}, "required_checks": ["string"], "template_key": "string", "template_version": "string", "repo_file_path": "string", "repo_file_sha": "string"})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"ai_reviewer_mode": "forbidden", "ai_graduation": {"rule": null, "agree_streak": 30}, "levels": {}, "merges_alone": {}, "required_checks": ["string"], "template_key": "string", "template_version": "string", "repo_file_path": "string", "repo_file_sha": "string"}`)
	req, _ := http.NewRequest("PUT", "https://app.opvs.ai/api/v1/projects/{project_id}/review-policy", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `GET` /api/v1/brands/{resource_id}/review-policy

**Get Brand Policy**

**Parameters**

- `resource_id` (path, integer, required)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `PUT` /api/v1/brands/{resource_id}/review-policy

**Put Brand Policy**

**Parameters**

- `resource_id` (path, integer, required)

**Request body**

```bash
curl -X PUT 'https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "ai_reviewer_mode": "forbidden",
  "ai_graduation": {
    "rule": null,
    "agree_streak": 30
  },
  "levels": {},
  "merges_alone": {},
  "required_checks": [
    "string"
  ],
  "template_key": "string",
  "template_version": "string",
  "repo_file_path": "string",
  "repo_file_sha": "string"
}'
```

```python
import httpx

resp = httpx.put(
    "https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"ai_reviewer_mode": "forbidden", "ai_graduation": {"rule": null, "agree_streak": 30}, "levels": {}, "merges_alone": {}, "required_checks": ["string"], "template_key": "string", "template_version": "string", "repo_file_path": "string", "repo_file_sha": "string"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy", {
  method: "PUT",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"ai_reviewer_mode": "forbidden", "ai_graduation": {"rule": null, "agree_streak": 30}, "levels": {}, "merges_alone": {}, "required_checks": ["string"], "template_key": "string", "template_version": "string", "repo_file_path": "string", "repo_file_sha": "string"})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"ai_reviewer_mode": "forbidden", "ai_graduation": {"rule": null, "agree_streak": 30}, "levels": {}, "merges_alone": {}, "required_checks": ["string"], "template_key": "string", "template_version": "string", "repo_file_path": "string", "repo_file_sha": "string"}`)
	req, _ := http.NewRequest("PUT", "https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `POST` /api/v1/review-policy/classify

**Classify Policy**

**Request body**

```bash
curl -X POST 'https://app.opvs.ai/api/v1/review-policy/classify' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "paths": [
    "string"
  ],
  "diff": "",
  "project_id": "00000000-0000-0000-0000-000000000000"
}'
```

```python
import httpx

resp = httpx.post(
    "https://app.opvs.ai/api/v1/review-policy/classify",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"paths": ["string"], "diff": "", "project_id": "00000000-0000-0000-0000-000000000000"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/review-policy/classify", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"paths": ["string"], "diff": "", "project_id": "00000000-0000-0000-0000-000000000000"})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"paths": ["string"], "diff": "", "project_id": "00000000-0000-0000-0000-000000000000"}`)
	req, _ := http.NewRequest("POST", "https://app.opvs.ai/api/v1/review-policy/classify", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `POST` /api/v1/projects/{project_id}/review-policy/classify-pull-request

**Classify Pull Request**

Classify one pull request from the repository attached to a project.

**Parameters**

- `project_id` (path, string, required)

**Request body**

```bash
curl -X POST 'https://app.opvs.ai/api/v1/projects/{project_id}/review-policy/classify-pull-request' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "pull_request_number": 0,
  "repository": "string"
}'
```

```python
import httpx

resp = httpx.post(
    "https://app.opvs.ai/api/v1/projects/{project_id}/review-policy/classify-pull-request",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"pull_request_number": 0, "repository": "string"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/projects/{project_id}/review-policy/classify-pull-request", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"pull_request_number": 0, "repository": "string"})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"pull_request_number": 0, "repository": "string"}`)
	req, _ := http.NewRequest("POST", "https://app.opvs.ai/api/v1/projects/{project_id}/review-policy/classify-pull-request", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `GET` /api/v1/review-policy/resolve

**Resolve Policy**

**Parameters**

- `repo` (query, string, required)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/review-policy/resolve' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/review-policy/resolve",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/review-policy/resolve", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/review-policy/resolve", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## Get Project Policy

`GET https://app.opvs.ai/api/v1/projects/{project_id}/review-policy`

Also as: MCP `tool_call software-factory.getProjectReviewPolicy` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Put Project Policy

`PUT https://app.opvs.ai/api/v1/projects/{project_id}/review-policy`

Also as: MCP `tool_call software-factory.setProjectReviewPolicy` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Get Brand Policy

`GET https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy`

Also as: MCP `tool_call software-factory.getBrandReviewPolicy` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Put Brand Policy

`PUT https://app.opvs.ai/api/v1/brands/{resource_id}/review-policy`

Also as: MCP `tool_call software-factory.setBrandReviewPolicy` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Classify Policy

`POST https://app.opvs.ai/api/v1/review-policy/classify`

Also as: MCP `tool_call software-factory.classifyReviewPolicy` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Classify Pull Request

`POST https://app.opvs.ai/api/v1/projects/{project_id}/review-policy/classify-pull-request`

Also as: MCP `tool_call software-factory.classifyPullRequest` · skill `software-factory`

Classify one pull request from the repository attached to a project.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Resolve Policy

`GET https://app.opvs.ai/api/v1/review-policy/resolve`

Also as: MCP `tool_call software-factory.resolveReviewPolicy` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |
