---
schema_version: "1"
id: 108b562948bab8f965cbabb1ff1e8c94645d4bd8f6994c2ab28a2b78bc039f49
title: Update Records Using sObject Rows
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/api-rest/guides/resources/resources-sobject-retrieve-patch.md
canonical_url: https://developer.salesforce.com/docs/platform/api-rest/guide/resources-sobject-retrieve-patch.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3961904f116fed59d7355d2f991011f663bd96f266160aed073ed3f40c652822
products:
  - REST API Developer Guide
  - Platform Developer Content
---

# Update Records Using sObject Rows

Updates a record based on the specified object and record ID. Field values provided in the request body replace the existing values in the record. This resource can be used with external objects in API version 32.0 and later.

External objects that are associated with non-high-data-volume external data sources use the 18-character Salesforce ID for the id. Otherwise, external objects use the External ID standard field of the external object for the id.

For information about the items in the response body, see [DescribeSObjectResult](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describesobjects_describesobjectresult.htm) in the *SOAP API Developer Guide*.

If the object is an Account object, the response also contains an ETag header. For example: `ETag: "ddpAdaTHz+GcV35e7NLJ9iKD3XXVqAzXT1Sl2ykkP7g=--gzip"` This ETag can be used with the `If-Match` and `If-None-Match` headers. For more information, see [Conditional Request Headers](https://developer.salesforce.com/docs/platform/api-rest/intro/intro-rest-conditional-requests.md).

## Syntax

**URI:** `/services/data/vXX.X/sobjects/sObject/id/`

**Formats:** JSON, XML

**HTTP Method:** PATCH

**Authentication:** `Authorization: Bearer token`

**Parameters**

|Parameter|Description|
|---------|-----------|
|`Content-Type`|An optional header that specifies the format for the request and response. The possible header values are `Content-Type: application/json` or `Content-Type: application/xml`.|
|`sObject`|The name of the object. For example, `Account` and `CustomObject__c`.|
|`id`|The identifier of the object. For example, `001R0000005hDFYIA2`.|
|`If-Match`|An optional header specifying a comma-delimited list of one or more ETags. This only has an effect when used with Account objects. The request is only processed if the Account’s ETag matches one of the ETags in the list. For example: `If-Match: "94C83JSreaVMGpL+lUzv8Dr3inI0kCvuKATVJcTuApA=--gzip", "ddpAdaTHz+GcV35e7NLJ9iKD3XXVqAzXT1Sl2ykkP7g=--gzip"`.|
|`If-None-Match`|An optional header specifying a comma-delimited list of one or more ETags. This only has an effect when used with Account objects. The request is only processed if the Account’s ETag does not match one of the ETags in the list. For example: `If-None-Match: "94C83JSreaVMGpL+lUzv8Dr3inI0kCvuKATVJcTuApA=--gzip", "ddpAdaTHz+GcV35e7NLJ9iKD3XXVqAzXT1Sl2ykkP7g=--gzip"`.|
|`If-Modified-Since`|An optional header specifying a date and time. The request returns records that have been modified after that date and time. The format is `EEE, dd MMM yyyy HH:mm:ss z`. For example: `If-Modified-Since: Mon, 30 Nov 2020 08:34:54 MST`.|
|`If-Unmodified-Since`|An optional header specifying a date and time. The request returns records that have not been modified after that date and time. The format is `EEE, dd MMM yyyy HH:mm:ss z`. For example: `If-Unmodified-Since: Mon, 30 Nov 2020 08:34:54 MST`.|

## Example

For an example of updating a record using PATCH, see [Update a Record](https://developer.salesforce.com/docs/platform/api-rest/do-me/dome-update-fields.md).

**See Also**  


-   [Object Reference for the Salesforce Platform](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/)
-   [Conditional Request Headers](https://developer.salesforce.com/docs/platform/api-rest/intro/intro-rest-conditional-requests.md)

