---
title: "Set favorite state for an item"
method: PUT
path: "/api/favorites"
tags: ["Favorites"]
---

# Set favorite state for an item

`PUT /api/favorites`

## Request body

- object
  - `itemType` 'page' | 'workflow' | 'schedule', required
  - `itemId` string, required
  - `favorite` boolean, required

## Response `200`

Favorite state

- object
  - `favorite` boolean, required
  - `itemType` 'page' | 'workflow' | 'schedule', required
  - `itemId` string, required
  - `row` UserFavorite, required
    - `id` string, required
    - `userId` string
    - `itemType` 'page' | 'workflow' | 'schedule', required
    - `itemId` string, required
    - `createdAt` string, required
    - `lastUpdatedAt` string, required
    - `createdBy` string
    - `updatedBy` string

## Other responses

- `401` — No authenticated principal context

---

[API](https://skmtc.net/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.net/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/versions/db1079e034dc/schema)
