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

# /record  - Array Input Version

DELETE https://record
Content-Type: application/json

## DELETE /record — Array (Bulk) Input Version

Bulk-delete one or more dataset records by supplying an array of record UUIDs in the request body. This is the preferred approach when you need to remove multiple records in a single API call.

***

### Summary

This endpoint deletes one or more records from a dataset. Rather than targeting a single record via a path variable (as in `DELETE /record/{record_uuid}`), this variant accepts a JSON body containing a `record_uuids` array, making it possible to delete multiple records atomically in one request.

***

### Contrast with the Single-Record Variant

| Feature          | This endpoint                    | `DELETE /record/{record_uuid}` |
| ---------------- | -------------------------------- | ------------------------------ |
| Input method     | JSON body (`record_uuids` array) | Path variable                  |
| Records per call | One or more                      | Exactly one                    |
| Use case         | Bulk deletion                    | Single targeted deletion       |

***

### Request Headers

| Header          | Value              | Description                                           |
| --------------- | ------------------ | ----------------------------------------------------- |
| `Content-Type`  | `application/json` | Indicates the request body is JSON.                   |
| `Authorization` | `Bearer {{token}}` | Bearer token required for all authenticated requests. |

***

### Authentication

Authentication is handled automatically via a **pre-request script** that:

1. POSTs to `{{url}}/token` using the `apiuser` and `apipass` environment variables as credentials.

2. Stores the returned access token in the `token` variable.

3. Sends the token as a `Bearer` token in the `Authorization` header.

Ensure the `url`, `apiuser`, and `apipass` variables are set in your active environment before sending this request.

***

### Request Body

**Content-Type:** `application/json`

| Field          | Type       | Required | Description                                            |
| -------------- | ---------- | -------- | ------------------------------------------------------ |
| `record_uuids` | `string[]` | ✅ Yes    | An array of one or more record UUID strings to delete. |

**Example:**

```json
{
    "record_uuids": [
        "3cbdf225b91bb2fc4d729df34c38"
    ]
}

```

Multiple UUIDs can be included in the array to delete several records in a single request.

***

### Permissions

The authenticated user must have **appropriate delete permissions** for the target dataset records. Requests from users without sufficient permissions will be rejected.

***

### Expected Responses

| Status Code                 | Description                                                                                     |
| --------------------------- | ----------------------------------------------------------------------------------------------- |
| `200 OK`                    | All specified records were successfully deleted.                                                |
| `400 Bad Request`           | The request body is malformed or `record_uuids` is missing/empty.                               |
| `401 Unauthorized`          | The Bearer token is missing, invalid, or expired.                                               |
| `403 Forbidden`             | The authenticated user does not have permission to delete one or more of the specified records. |
| `404 Not Found`             | One or more of the provided UUIDs do not correspond to existing records.                        |
| `500 Internal Server Error` | An unexpected server-side error occurred.                                                       |

Reference: https://docs.odr.io/odr-search-api-v-4/record-array-input-version

## Request

### Body (application/json)

This endpoint expects an object.

- `record_uuids` (list of string, required)

## Response

### 200

OK

- `deleted` (list of string, required)
- `count` (integer, required)

## Examples

**Request**

```json
{
  "record_uuids": [
    "3cbdf225b91bb2fc4d729df34c38"
  ]
}
```

**Response**

```json
{
  "deleted": [
    "3cbdf225b91bb2fc4d729df34c38"
  ],
  "count": 1
}
```

**SDK Code**

```python /record  - Array Input Version_example
import requests

url = "https://https/record"

payload = { "record_uuids": ["3cbdf225b91bb2fc4d729df34c38"] }
headers = {"Content-Type": "application/json"}

response = requests.delete(url, json=payload, headers=headers)

print(response.json())
```

```javascript /record  - Array Input Version_example
const url = 'https://https/record';
const options = {
  method: 'DELETE',
  headers: {'Content-Type': 'application/json'},
  body: '{"record_uuids":["3cbdf225b91bb2fc4d729df34c38"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go /record  - Array Input Version_example
package main

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

func main() {

	url := "https://https/record"

	payload := strings.NewReader("{\n  \"record_uuids\": [\n    \"3cbdf225b91bb2fc4d729df34c38\"\n  ]\n}")

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

	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 /record  - Array Input Version_example
require 'uri'
require 'net/http'

url = URI("https://https/record")

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

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"record_uuids\": [\n    \"3cbdf225b91bb2fc4d729df34c38\"\n  ]\n}"

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

```java /record  - Array Input Version_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://https/record")
  .header("Content-Type", "application/json")
  .body("{\n  \"record_uuids\": [\n    \"3cbdf225b91bb2fc4d729df34c38\"\n  ]\n}")
  .asString();
```

```php /record  - Array Input Version_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://https/record', [
  'body' => '{
  "record_uuids": [
    "3cbdf225b91bb2fc4d729df34c38"
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp /record  - Array Input Version_example
using RestSharp;

var client = new RestClient("https://https/record");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"record_uuids\": [\n    \"3cbdf225b91bb2fc4d729df34c38\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift /record  - Array Input Version_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["record_uuids": ["3cbdf225b91bb2fc4d729df34c38"]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://https/record")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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()
```