---
schema_version: "1"
id: d6fe26baa29370e5f6bbf8e514f9b8e65e4ad838fed7c7d06eb3ad8f01cbabf0
title: Delete a Record
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/graphql-api/graphql/guides/mutations/mutations-delete.md
canonical_url: https://developer.salesforce.com/docs/platform/graphql/guide/mutations-delete.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6aff5f291b60a1fd1fb4d85dcd41ae68cf1c58136c08f202361b3960c85e7129
products:
  - GraphQL API
---
# Delete a Record

| AVAILABLE API VERSION               |
| ----------------------------------- |
| Beta v59.0–65.0                     |
| Generally available v66.0 and later |

Use `mutations` to delete a record. Within `mutations`, the [`RecordDelete` field](https://developer.salesforce.com/docs/platform/graphql/guide/mutations-schema.md) enables you to update all object types your Salesforce user has access to. Only [objects supported by UI API](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_get_started_supported_objects.htm) are available for mutations.

## Example Delete Request

To delete a record, use `RecordDelete` with the `Id` for the record you want to delete.

```
mutation AccountDeleteExample{
  uiapi {
    AccountDelete(input: {
      Id: "001RM000005eiZZZZZ"
    })
      {
         Id
      }
  }
}
```

## Example Response on Deletion

The response body returns the `Id` value of the record you deleted.

```
{
  "data": {
    "uiapi": {
      "AccountDelete": {
        "Id": "001RM000005eiZZZZZ"
      }
    }
  },
  "errors": []
}
```

## Record Delete Guidelines

Consider these guidelines for deleting a record.

- Sending a delete request with an incorrect `Id` value returns a `DataFetchingException` error.
- Sending a delete request for a record that’s already deleted returns a `DataFetchingException` error.

## See Also

[Send Mutation Requests](https://developer.salesforce.com/docs/platform/graphql/guide/mutations-use.md)
