# Factory Claim

Source: https://opvs.ai/docs/api/factory-claim

## `GET` /api/v1/factory/claim/box

**Claim Box**

Lease a FREE desk from the caller's brand pool for the builder of ``role``.

**Parameters**

- `role` (query, string, required) — Builder role_slug to claim a desk for.
- `task_id` (query, any, optional) — Board card this lease serves; omit for a warm claim.

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

```python
import httpx

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

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

**Responses**

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

## `POST` /api/v1/factory/claim/box/{claim_id}/release

**Release Box**

Close a live lease, freeing its box for the next claimant.

**Parameters**

- `claim_id` (path, string, required)

```bash
curl -X POST 'https://app.opvs.ai/api/v1/factory/claim/box/{claim_id}/release' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.post(
    "https://app.opvs.ai/api/v1/factory/claim/box/{claim_id}/release",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/factory/claim/box/{claim_id}/release", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://app.opvs.ai/api/v1/factory/claim/box/{claim_id}/release", 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/factory/claim/active

**List Active**

The brand's live leases (busy desks) — the "who's using the pool now" read.

**Parameters**

- `role` (query, any, optional) — Filter to one role_slug.
- `limit` (query, integer, optional)
- `offset` (query, integer, optional)

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

```python
import httpx

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

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

**Responses**

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

## Claim Box

`GET https://app.opvs.ai/api/v1/factory/claim/box`

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

Lease a FREE desk from the caller's brand pool for the builder of ``role``.

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

## Release Box

`POST https://app.opvs.ai/api/v1/factory/claim/box/{claim_id}/release`

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

Close a live lease, freeing its box for the next claimant.

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

## List Active

`GET https://app.opvs.ai/api/v1/factory/claim/active`

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

The brand's live leases (busy desks) — the "who's using the pool now" read.

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