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

# Unfavorite document

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

Remove a document from a user's favorites. Only published documents can be unfavorited.

**Note**: Successful requests will return `204` regardless of whether the document was previously favorited or not.

## Path parameters

- `documentId` string, required

## Query parameters

- `userId` string

## Response `204`

Document unfavorited successfully. No response body.

This response is returned whether the document was previously favorited or not.

## Other responses

- `400` — Invalid HTTP method
- `403` — Forbidden. Possible causes: - Personal Access Token attempted to act on behalf of another user
- `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)
