---
schema_version: "1"
id: f83102a19df2de54e37fae8ad61342a615d3d56f0eb2e4c5458008727f56716d
title: Update a Batch of Favorites
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/uiapi/ui_api_resources_favorites_batch_update.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_resources_favorites_batch_update.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 244c486326532e510f263b1f227b088a614c231b777fabb4d908266f310f4c19
description: Update all favorites at once. The sort order is updated to the given relative ordering. Any favorites missing from the request body are deleted.
---
# Update a Batch of Favorites

Update all favorites at once. The sort order is updated to the given relative ordering. Any favorites missing from the request body are deleted.

Resource

/ui-api/favorites/batch

Available Version

41.0

HTTP Method

PUT

Request Body

JSON example

{
  favorites: \[
  {
    id: "0MVR00000004DhnOAE",
    name: "Q4 Perf"
  }, { 
    id: "0MVR00000004DhsOAE"
  }, {
    id: "0MVR00000004DiGOAU"
  }, {
    id: "0MVR000000001e2OAA",
    name: "Office Group"
  }, {
    id: "0MVR00000004GGlOAM"
  }}\]
}

Properties

| Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| favorites | [Favorite Batch Input](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_requests_favorite_batch_input.htm#ui_api_requests_favorite_batch_input "Represents a single favorite when updating favorites in batch.")\[\] | The list of favorites to keep and update. | Required | 41.0 |

Response Body

[Favorite Collection](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_responses_favorite_collection.htm#ui_api_responses_favorite_collection "A list of favorites.")