Favorites
Update a favorite
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:
PATCH /v2/favorites/{favoriteId}
Parameters
Path parameters
favoriteId
string (uuid) required
Request body
Content-Type: application/json
ranking
integer
Example
{
"ranking": 0
}
Responses
200 — Successful response
Content-Type: application/json
data
object required
data.favorite
object required
data.favorite.id
string (uuid) required
data.favorite.user_id
string
data.favorite.group_id
string (uuid) | null
data.favorite.view_id
string (uuid) | null
data.favorite.contact_id
string (uuid) | null
data.favorite.ranking
integer | null
data.favorite.created_at
string (date-time) required
data.favorite.updated_at
string (date-time) required
data.favorite.groups
object | null
data.favorite.views
object | null
data.favorite.contacts
object | null
Example
{
"data": {
"favorite": {
"id": "00000000-0000-0000-0000-000000000000",
"created_at": "2026-09-17T02:39:21.263Z",
"updated_at": "2026-09-17T02:39:21.263Z"
}
}
}
400 — Request body failed validation.
Content-Type: application/json
(body)
any
401 — Missing or invalid API key.
Content-Type: application/json
(body)
any
403 — Valid key, insufficient permission.
Content-Type: application/json
(body)
any
404 — Resource does not exist.
Content-Type: application/json
(body)
any
409 — Request conflicts with the current state of the resource.
Content-Type: application/json
(body)
any
429 — Rate limit exceeded.
Content-Type: application/json
(body)
any
500 — Unexpected server error.
Content-Type: application/json
(body)
any
Code samples
curl https://api.prod.getdex.com/v2/favorites/00000000-0000-0000-0000-000000000000 \
--request PATCH \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"ranking": 0
}'
fetch('https://api.prod.getdex.com/v2/favorites/00000000-0000-0000-0000-000000000000', {
method: 'PATCH',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ranking: 0
})
})
requests.patch(
"https://api.prod.getdex.com/v2/favorites/00000000-0000-0000-0000-000000000000",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"ranking": 0
}
)
Get a favorite
Retrieve a single favorite by its unique ID. Returns `{ data: { favorite: {...} } }`. The polymorphic target — exactly one of `group_id`, `view_id`, or `contact_id` — is on the favorite body; relation
Delete a favorite
Unstar a group, view, or contact by deleting the favorite row. Returns the canonical bulk envelope: `{ data: { affected: 1, ids: [favoriteId] } }`. `Idempotency-Key` is optional.

