---
schema_version: "1"
id: c4201ac468241630920e4584200d51e1ed872854e5fdd85059cc58e0ee547643
title: Delete Records Using sObject Relationships
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/api-rest/guides/resources/resources-sobject-relationships-delete.md
canonical_url: https://developer.salesforce.com/docs/platform/api-rest/guide/resources-sobject-relationships-delete.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c1db6b8e83cb7bab53929a1ec7433a38fd3936c19e434bdb7e162e6ecc4abff4
products:
  - REST API Developer Guide
  - Platform Developer Content
---

# Delete Records Using sObject Relationships

Deletes a parent record based on the specified object, record ID, and relationship field name. Only a child-to-parent relationship can be traversed when you delete records.

If the `fields` parameter is used with fields that don’t exist or aren’t visible to the consumer by field-level security, a 400 error response is returned. For other error messages, see [Status Codes and Error Responses](https://developer.salesforce.com/docs/platform/api-rest/guide/errorcodes.md).

## Syntax

**URI:** `/services/data/vXX.X/sobjects/sObject/id/relationshipFieldName`

**Formats:** JSON, XML

**HTTP Method:** DELETE

**Authentication:** `Authorization: Bearer token`

**Parameters**

|Parameter|Description|
|---------|-----------|
|`sObject`|The name of the object. For example, `Contact`.|
|`id`|The identifier of the record. For example, `003R0000005hDFYIA2`, the contact ID.|
|`relationshipFieldName`|The name of the field that contains the relationship. For example, `Account`. Account is the name of the relationship on the child Contact object.|

When you delete a parent record, it deletes all child records that have a master-detail relationship to the parent record.

## Example

For examples of using sObject Relationships to delete a relationship record, see [Traverse Relationships with Friendly URLs](https://developer.salesforce.com/docs/platform/api-rest/do-me/dome-relationship-traversal.md#traverse-relationships-with-friendly-urls).

**See Also**  


-   [Object Reference for the Salesforce Platform](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/)

