Delete records
Use this REST endpoint to delete records based on the specified record IDs. Specify the record ID and use the DELETE method of the resource to delete a record or a list of records.
The action performed when deleting a record depends on the entity type. For example, native Magentrix entities are soft-deleted and can be restored from the recycle bin for up to 30 days. Deleting external records (such as Salesforce.com objects) will remove the record from the external system via its API. Please review the relevant data retention policies for any external systems.
curl DELETE 'https://{domain}/api/3.0/entity/{entity_name}'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
-d '{JSON array of IDs}'The list of record IDs must be of the same entity type, and you can provide up to 200 IDs at a time.
You can also call the API to delete a single record like this:
curl DELETE 'https://{domain}/api/3.0/entity/{entity_name}/{record_id}'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
Request
entity_name string Required
Use the entity’s API name in the REST resource path to specify the type of record you want to delete.
record_id string Optional
Use this parameter to outline which record should be deleted. Do not include "record_id" if you wish to delete more than one record via body payload.
Request Body
JSONdata string Optional
An optional list of record IDs to be deleted. You need to limit the number of IDs to a maximum of 200.
Example
curl DELETE 'https://{domain}/api/3.0/entity/account/00100000000001F0001'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
Successful Response
HTTP 200 OK
{
"id": "00100000000001F0001",
"errors": [],
"success": true
}If your request payload contains an array of entities, the response will also be an array. Each item (ID) in the response corresponds to its matching record in the original payload, in the same order.
Failed Response
HTTP 404 Not Found
{
"message": "Record was not found or you may not have access.",
"success": false
}
Conditional Delete
Single-record DELETE supports the same precondition headers as PATCH (If-Match and If-Unmodified-Since). Use them when you want the delete to fail if the record has changed since you last read it — for example, to avoid deleting a record that another process just updated.
| Request Header | Behaviour |
|---|
| If-Match | The DELETE proceeds only if the record's current ETag matches the supplied value. If-Match: * accepts any existing record. |
| If-Unmodified-Since | The DELETE proceeds only if the record's ModifiedOn is at or before the supplied date. |
When a precondition fails, the server returns HTTP 412 Precondition Failed and the record is not deleted. A malformed If-Unmodified-Since returns HTTP 400 Bad Request with error code INVALID_HEADER. For full header semantics and the list of accepted date formats, see Update a Record — Optimistic Concurrency.
Examples
Atomic delete using an ETag from a prior GET
DELETE /api/3.0/entity/account/0010000000000010001 HTTP/1.1
Authorization: Bearer <token>
If-Match: W/"2026-04-17T20:42:11.107Z"
Delete only if no changes since a cutoff
DELETE /api/3.0/entity/account/0010000000000010001 HTTP/1.1
Authorization: Bearer <token>
If-Unmodified-Since: Fri, 17 Apr 2026 20:42:11 GMT
Bulk DELETE and Concurrency
Per-record preconditions do not apply to bulk DELETE. All records in a bulk request are deleted regardless of any request headers sent. If you need optimistic concurrency on a specific record, send a single-record DELETE.
Status Codes
| HTTP Code | Error Code | Triggered When |
|---|
| 200 OK | — | The record (or records, for bulk) was deleted. |
| 202 Accepted | — | Bulk delete: some records were deleted and some failed. The response body indicates which. |
| 400 Bad Request | INVALID_HEADER | If-Unmodified-Since could not be parsed. |
| 400 Bad Request | — | More than 200 IDs were supplied, or no IDs / record_id were provided. |
| 404 Not Found | ENTITY_NOT_FOUND | The record was not found, or you do not have access. See Failed Response above. |
| 406 Not Acceptable | — | The record could not be deleted (for example, a dependency prevents it), or all records in a bulk request failed. |
| 412 Precondition Failed | PRECONDITION_FAILED | If-Match was supplied and did not match the current ETag — or If-Unmodified-Since was supplied and the record was modified after that date. The record is not deleted. |
What Is Next?