# Replace star — PUT /v1/project/{slug}/star

URL: https://docs.hanzo.ai/docs/openapi/project/put-project-by-slug-star

> Bookmarks a project for the person calling, and answers whether it is starred afterwards.

`PUT /v1/project/{slug}/star`

> [Project →](https://docs.hanzo.ai/docs/openapi/project) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                               |
| ------------- | --------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/project/{slug}/star` |
| **Method**    | `PUT`                                         |
| **Operation** | `put_project_by_slug_star`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`        |

Bookmarks a project for the person calling, and answers whether it is
starred afterwards.

The star is YOURS: it is keyed by you as well as by the project, so two people
see two answers for the same one and starring it says nothing about anybody
else's list. Starring a project you have already starred leaves it starred.

## Request

1 field.

| Field  | In   | Type   | Required | Description                                   |
| ------ | ---- | ------ | -------- | --------------------------------------------- |
| `slug` | path | string | yes      | Slug is the project to act on, from the path. |

## Response

| Status    | Body                 | Meaning |
| --------- | -------------------- | ------- |
| `200`     | project.projectsStar | ok      |
| `default` | problem-details      | refused |

`200` body — 1 field.

| Field     | In   | Type    | Always | Description                                                                                                                                                                      |
| --------- | ---- | ------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `starred` | body | boolean | —      | Starred is whether THIS caller has starred the project after the toggle — their own bookmark, not a property the project carries, so two people see two answers for one project. |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo project star replace <slug>
```

**SDK**

**.ts**

```ts
import { Configuration, ProjectApi } from 'hanzoai';

const api = new ProjectApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.putProjectBySlugStar({ slug: 'slug' });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ProjectApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ProjectApi(client).put_project_by_slug_star(slug='slug')
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ProjectAPI.PutProjectBySlugStar(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, project_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = project_api::put_project_by_slug_star(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ProjectApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ProjectApi(client).putProjectBySlugStar();
```

**HTTP**

```bash
curl -X PUT https://api.hanzo.ai/v1/project/<slug>/star \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `project`, op `put_project_by_slug_star` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "project",
         "arguments": {
           "op": "put_project_by_slug_star",
           "input": {
             "slug": "<slug>"
           }
         }
       }
     }'
```

---

[Project API](https://docs.hanzo.ai/docs/openapi/project) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
