> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.brevo.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.brevo.com/_mcp/server.

# Delete multiple object records (up to 1000) asynchronously

POST https://api.brevo.com/v3/objects/{object_type}/batch/delete
Content-Type: application/json

Use this endpoint to delete multiple object records of the same object-type in one request.
The request is accepted and processed asynchronously. You can track the status of the deletion process using the returned **processId**.
**Limitations:** - Each request can contain up to **1000** object record identifiers - Either `ids` or `ext_ids` must be provided, but **not both** in the same request - Deletion of Brevo standard object records is not supported via this endpoint - If more records must be deleted, send multiple batch requests


Reference: https://developers.brevo.com/reference/custom-objects/batch-delete-object-records

## Authentication

- `api-key` header (required) — The API key should be passed in the request headers as `api-key` for authentication.

## Request

### Path parameters

- `object_type` (string, required) — Object type for the records to delete

### Body (application/json)

This endpoint expects an object.

- `identifiers` (any or any, optional) — Either `ids` or `ext_ids` must be provided, but not both in the same request.

## Response

### 202

Batch request accepted for deletion - process started

- `processId` (long, optional) — Identifier for batch process tracking
- `message` (string, optional)

## Errors

### 400 Bad Request Error

Invalid request (e.g., invalid object_type, invalid request body, both ids and ext_ids provided, or exceeds 1000 identifiers limit)

- `any`

### 403 Forbidden Error

Deletion of Brevo standard object records is not supported via this endpoint

- `any`

### 500 Internal Server Error

Internal server error

- `any`

## Examples

**Request**

```json
{
  "identifiers": {
    "ext_ids": [
      "ext-001",
      "ext-002"
    ],
    "ids": [
      101,
      102,
      103
    ]
  }
}
```

**Response**

```json
{
  "processId": 21,
  "message": "Batch object records are being processed for deletion"
}
```

**SDK Code**

```typescript Delete using external identifiers
import { BrevoClient } from "@getbrevo/brevo";

async function main() {
    const client = new BrevoClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.customObjects.batchDeleteObjectRecords({
        objectType: "vehicle",
    });
}
main();

```

```python Delete using external identifiers
from brevo import Brevo

client = Brevo(
    api_key="YOUR_API_KEY_HERE",
)

client.custom_objects.batch_delete_object_records(
    object_type="vehicle",
)

```

```php Delete using external identifiers
<?php

namespace Example;

use Brevo\Brevo;
use Brevo\CustomObjects\Requests\BatchDeleteObjectRecordsRequest;
use Brevo\CustomObjects\Types\BatchDeleteObjectRecordsRequestIdentifiersIds;

$client = new Brevo(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->customObjects->batchDeleteObjectRecords(
    'vehicle',
    new BatchDeleteObjectRecordsRequest([
        'identifiers' => new BatchDeleteObjectRecordsRequestIdentifiersIds([
            'ids' => [
                101,
                102,
                103,
            ],
        ]),
    ]),
);

```

```go Delete using external identifiers
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.brevo.com/v3/objects/vehicle/batch/delete"

	payload := strings.NewReader("{\n  \"identifiers\": {\n    \"ext_ids\": [\n      \"ext-001\",\n      \"ext-002\"\n    ],\n    \"ids\": [\n      101,\n      102,\n      103\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Delete using external identifiers
require 'uri'
require 'net/http'

url = URI("https://api.brevo.com/v3/objects/vehicle/batch/delete")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"identifiers\": {\n    \"ext_ids\": [\n      \"ext-001\",\n      \"ext-002\"\n    ],\n    \"ids\": [\n      101,\n      102,\n      103\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Delete using external identifiers
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.brevo.com/v3/objects/vehicle/batch/delete")
  .header("api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"identifiers\": {\n    \"ext_ids\": [\n      \"ext-001\",\n      \"ext-002\"\n    ],\n    \"ids\": [\n      101,\n      102,\n      103\n    ]\n  }\n}")
  .asString();
```

```csharp Delete using external identifiers
using RestSharp;

var client = new RestClient("https://api.brevo.com/v3/objects/vehicle/batch/delete");
var request = new RestRequest(Method.POST);
request.AddHeader("api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"identifiers\": {\n    \"ext_ids\": [\n      \"ext-001\",\n      \"ext-002\"\n    ],\n    \"ids\": [\n      101,\n      102,\n      103\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Delete using external identifiers
import Foundation

let headers = [
  "api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["identifiers": [
    "ext_ids": ["ext-001", "ext-002"],
    "ids": [101, 102, 103]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.brevo.com/v3/objects/vehicle/batch/delete")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```