# Org Chart

Source: https://opvs.ai/docs/api/org-chart

## `GET` /api/v1/org-chart

**Get Org Chart**

**Parameters**

- `format` (query, any, optional) — Response format: yaml or md

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

```python
import httpx

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

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart", {
  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/org-chart", 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/org-chart/agents/{hire_id}/managers

**Replace Managers**

**Parameters**

- `hire_id` (path, string, required)

**Request body**

```bash
curl -X PUT 'https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/managers' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "manager_hire_ids": [
    "string"
  ],
  "manager_user_ids": [
    0
  ]
}'
```

```python
import httpx

resp = httpx.put(
    "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/managers",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"manager_hire_ids": ["string"], "manager_user_ids": [0]},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/managers", {
  method: "PUT",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"manager_hire_ids": ["string"], "manager_user_ids": [0]})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"manager_hire_ids": ["string"], "manager_user_ids": [0]}`)
	req, _ := http.NewRequest("PUT", "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/managers", 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/org-chart/report-rules

**List Report Rules**

**Parameters**

- `format` (query, any, optional) — Response format: yaml or md

```bash
curl -X GET 'https://app.opvs.ai/api/v1/org-chart/report-rules' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

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

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart/report-rules", {
  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/org-chart/report-rules", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

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

## `GET` /api/v1/org-chart/agents/{hire_id}/rules

**Get Agent Rules**

**Parameters**

- `hire_id` (path, string, required)
- `format` (query, any, optional) — Response format: yaml or md

```bash
curl -X GET 'https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/rules' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/rules",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/rules", {
  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/org-chart/agents/{hire_id}/rules", 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/org-chart/agents/{hire_id}/rules

**Put Agent Rules**

**Parameters**

- `hire_id` (path, string, required)

**Request body**

```bash
curl -X PUT 'https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/rules' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "opvs_mode": "string",
  "forbidden_skills": [
    "string"
  ],
  "autonomous_budget": 0.0,
  "requires_review": true,
  "review_type": "string",
  "may_hand_on": true
}'
```

```python
import httpx

resp = httpx.put(
    "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/rules",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"opvs_mode": "string", "forbidden_skills": ["string"], "autonomous_budget": 0.0, "requires_review": true, "review_type": "string", "may_hand_on": true},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/rules", {
  method: "PUT",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"opvs_mode": "string", "forbidden_skills": ["string"], "autonomous_budget": 0.0, "requires_review": true, "review_type": "string", "may_hand_on": true})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"opvs_mode": "string", "forbidden_skills": ["string"], "autonomous_budget": 0.0, "requires_review": true, "review_type": "string", "may_hand_on": true}`)
	req, _ := http.NewRequest("PUT", "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/rules", 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

## `PUT` /api/v1/org-chart/agents/{hire_id}/report-rules

**Upsert Report Rule**

**Parameters**

- `hire_id` (path, string, required)

**Request body**

```bash
curl -X PUT 'https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "manager_hire_id": "string",
  "manager_user_id": 0,
  "channel": "string",
  "frequency": "string",
  "weekday": 0,
  "send_time": "string",
  "timezone": "string",
  "blockers_now": true
}'
```

```python
import httpx

resp = httpx.put(
    "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"manager_hire_id": "string", "manager_user_id": 0, "channel": "string", "frequency": "string", "weekday": 0, "send_time": "string", "timezone": "string", "blockers_now": true},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules", {
  method: "PUT",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"manager_hire_id": "string", "manager_user_id": 0, "channel": "string", "frequency": "string", "weekday": 0, "send_time": "string", "timezone": "string", "blockers_now": true})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"manager_hire_id": "string", "manager_user_id": 0, "channel": "string", "frequency": "string", "weekday": 0, "send_time": "string", "timezone": "string", "blockers_now": true}`)
	req, _ := http.NewRequest("PUT", "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules", 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

## `DELETE` /api/v1/org-chart/agents/{hire_id}/report-rules

**Delete Report Rule**

**Parameters**

- `hire_id` (path, string, required)
- `manager_hire_id` (query, any, optional)
- `manager_user_id` (query, any, optional)

```bash
curl -X DELETE 'https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.delete(
    "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules", {
  method: "DELETE",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

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

## `GET` /api/v1/org-chart/agents/{hire_id}/claiming

**Get Claiming**

**Parameters**

- `hire_id` (path, string, required)
- `format` (query, any, optional) — Response format: yaml or md

```bash
curl -X GET 'https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming", {
  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/org-chart/agents/{hire_id}/claiming", 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/org-chart/agents/{hire_id}/claiming

**Set Claim Roles**

**Parameters**

- `hire_id` (path, string, required)

**Request body**

```bash
curl -X PUT 'https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "claim_roles": [
    "string"
  ]
}'
```

```python
import httpx

resp = httpx.put(
    "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"claim_roles": ["string"]},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming", {
  method: "PUT",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"claim_roles": ["string"]})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"claim_roles": ["string"]}`)
	req, _ := http.NewRequest("PUT", "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming", 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/org-chart/agents/{hire_id}/claiming/columns

**Add Claim Column**

**Parameters**

- `hire_id` (path, string, required)

**Request body**

```bash
curl -X POST 'https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming/columns' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "column_id": "string",
  "role": "string"
}'
```

```python
import httpx

resp = httpx.post(
    "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming/columns",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"column_id": "string", "role": "string"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming/columns", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"column_id": "string", "role": "string"})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"column_id": "string", "role": "string"}`)
	req, _ := http.NewRequest("POST", "https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming/columns", 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 Org Chart

`GET https://app.opvs.ai/api/v1/org-chart`

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

## Replace Managers

`PUT https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/managers`

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

## List Report Rules

`GET https://app.opvs.ai/api/v1/org-chart/report-rules`

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

## Get Agent Rules

`GET https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/rules`

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

## Put Agent Rules

`PUT https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/rules`

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

## Upsert Report Rule

`PUT https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules`

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

## Delete Report Rule

`DELETE https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/report-rules`

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

## Get Claiming

`GET https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming`

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

## Set Claim Roles

`PUT https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming`

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

## Add Claim Column

`POST https://app.opvs.ai/api/v1/org-chart/agents/{hire_id}/claiming/columns`

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