Delete a Batch of Records

Delete multiple records. You can create, update, and delete up to 200 records in a single request.
Resource
/ui-api/records/batch
Available Version
59.0
HTTP Method
POST
Example
This example deletes multiple records.
POST /ui-api/records/batch
{
  "allOrNone": false,
  "operations": [
    {
      "type": "Delete",
      "records": [
        {
          "fields": {
            "Id": "001xx000003GanDAAS"
          }
        },
        {
          "fields": {
            "Id": "001xx000003Gaf9AAC"
          }
        }
      ]
    }
  ]
}
Request Body
Name Type Description Required or Optional Available Version
recordInput Batch Record Input The batch of record input. Required 59.0
Response Body
Batch Results
Usage
When deleting a batch of records, you must include the required Id field. Don’t include the apiName field in Batch Operation Input.
You can’t perform multiple operations on the same record in one request. A delete operation using an Id value that’s used in another update or delete operation can’t be processed. Otherwise, a 400 HTTP status code with an INVALID_BATCH_REQUEST error is returned.
Receiving a 400 HTTP status code with an INVALID_INPUT error can be caused by one of these reasons.
  • The operations field is missing or empty.
  • The operation type is missing.
  • The operations field doesn’t contain a records field or the records field is empty.