---
title: "Star or unstar"
description: "kind is doc (a page, document or file; ref is its slug), team or project (ref is its id)."
canonical_url: https://docs.markdrop.in/api/teams/star-or-unstar
last_updated: 2026-11-20
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Star or unstar

`PUT https://api.markdrop.in/api/v1/workspaces/{workspace_id}/favorites`

`kind` is `doc` (a page, document or file; `ref` is its slug), `team` or `project` (`ref` is its id). `on: false` removes it. Returns the updated list. Up to 50 per workspace.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 120 per minute per IP address.
- **MCP tool:** `set_favorite` ([tools](https://docs.markdrop.in/ai/tools))

## Path parameters

- `workspace_id` (string, required): The workspace's id, from the address of its settings page (`markdrop.in/settings/workspaces/<workspace-id>`) or from [List workspaces](https://docs.markdrop.in/api/workspaces/list-workspaces).

## Request body

`application/json`, required.

- `kind` ("doc" | "project" | "team", required)
- `ref` (string, required): 1–80 characters.
- `on` (boolean): Default `true`.

## Responses

- `200`: OK.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X PUT https://api.markdrop.in/api/v1/workspaces/WORKSPACE_ID/favorites \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"kind":"doc","ref":"REF"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/workspaces/WORKSPACE_ID/favorites", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "kind": "doc",
    "ref": "REF"
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.put(
    "https://api.markdrop.in/api/v1/workspaces/WORKSPACE_ID/favorites",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"kind": "doc", "ref": "REF"},
)
r.raise_for_status()
print(r.json())
```
