---
title: "Favorite document"
method: PUT
path: "/v1/documents/{documentId}/favorite"
tags: ["Document favorites"]
---

# Favorite document

`PUT /v1/documents/{documentId}/favorite`

Add a document to a user's favorites. Only published documents can be favorited.

**Note**: Successful requests will return `204` regardless of whether the document is newly favorited or already in the user's favorites.

## Path parameters

- `documentId` string, required

## Query parameters

- `userId` string

## Response `204`

Document favorited successfully. No response body.

This response is returned whether the document was newly favorited or already in favorites.

## Other responses

- `403` — Forbidden. Possible causes: - Personal Access Token attempted to act on behalf of another user. PATs cannot use the `userId` parameter.
- `404` — Not Found. Possible causes: - Document does not exist - Document is not published - Specified `userId` not found
- `405` — Method Not Allowed - Invalid HTTP method for this endpoint
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/revisions/6b02f7349d0e/schema)
