---
title: "Update a favorite (v2)"
method: PATCH
path: "/v2/favorites/{favoriteId}"
tags: ["favorites"]
---

# Update a favorite (v2)

`PATCH /v2/favorites/{favoriteId}`

Partial update of a favorite. Only `ranking` is mutable — the polymorphic target (group / view / contact) is fixed once the row is created. **Requires `Idempotency-Key`.** Returns `{ data: { favorite: {...} } }`.

## Path parameters

- `favoriteId` string, uuid, required

## Request body

- object
  - `ranking` integer

## Response `200`

Successful response

- object
  - `data` object, required
    - `favorite` object, required
      - `id` string, uuid, required
      - `user_id` string
      - `group_id` string, uuid, nullable
      - `view_id` string, uuid, nullable
      - `contact_id` string, uuid, nullable
      - `ranking` integer, nullable
      - `created_at` union, required
        - string, date-time
        - unknown
      - `updated_at` union, required
        - string, date-time
        - unknown
      - `groups` object, nullable
      - `views` object, nullable
      - `contacts` object, nullable

## Other responses

- `400` — Request body failed validation.
- `401` — Missing or invalid API key.
- `403` — Valid key, insufficient permission.
- `404` — Resource does not exist.
- `409` — Request body failed validation.
- `429` — Rate limit exceeded.
- `500` — Unexpected server error.

---

[API](https://skmtc.net/getdex/apis/dex-public-api.md) · [All operations](https://skmtc.net/getdex/apis/dex-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getdex/dex-public-api/versions/6f01cd52ac12/schema)
