> 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/{record_uuid}

DELETE https://record/3cbdf225b91bb2fc4d729df34c38

## DELETE /record/\{record\_uuid}

Permanently deletes a dataset record identified by its UUID. The record is removed from the system and cannot be recovered. The caller must have the appropriate permissions to delete the target record.

***

### HTTP Method & URL

```
DELETE {{url}}/record/{record_uuid}
```

***

### Path Parameters

| Parameter     | Type          | Required | Description                                    |
| ------------- | ------------- | -------- | ---------------------------------------------- |
| `record_uuid` | string (UUID) | ✅ Yes    | The unique identifier of the record to delete. |

***

### Headers

| Key             | Value              | Description                                                                          |
| --------------- | ------------------ | ------------------------------------------------------------------------------------ |
| `Content-Type`  | `application/json` | Specifies the request payload format.                                                |
| `Authorization` | `Bearer <token>`   | Bearer token automatically set by the pre-request script (see Authentication below). |

***

### Authentication

Authentication is handled automatically via a **pre-request script**. Before the request is sent, the script performs the following:

1. POSTs to `{{url}}/token` using the `apiuser` and `apipass` environment variables as credentials.
2. Retrieves a Bearer token from the response.
3. Sets the token as a variable so it is included in the `Authorization` header of this request.

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

***

### Permissions

This endpoint enforces permission checks. The authenticated user must have sufficient privileges to delete the specified record. Attempting to delete a record without the required permissions will result in an error response. See the related request **`/record/{record_uuid} Invalid Permissions`** for an example of the error behavior when permissions are insufficient.

***

### Response

A successful deletion will return an appropriate HTTP success status (e.g., `200 OK` or `204 No Content`). No record data is returned after deletion.

Reference: https://docs.odr.io/odr-search-api-v-4/record-record-uuid

## Response

### 200

OK

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

## Errors

### 500 Internal Server Error

Internal Server Error

- `error` (object, required)
  - `code` (integer, required)
  - `message` (string, required)

## Examples

**Response**

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

**SDK Code**

```python /record/{record_uuid}_example
import requests

url = "https://https/record/3cbdf225b91bb2fc4d729df34c38"

response = requests.delete(url)

print(response.json())
```

```javascript /record/{record_uuid}_example
const url = 'https://https/record/3cbdf225b91bb2fc4d729df34c38';
const options = {method: 'DELETE'};

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

```go /record/{record_uuid}_example
package main

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

func main() {

	url := "https://https/record/3cbdf225b91bb2fc4d729df34c38"

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

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

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

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

}
```

```ruby /record/{record_uuid}_example
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Delete.new(url)

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

```java /record/{record_uuid}_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://https/record/3cbdf225b91bb2fc4d729df34c38")
  .asString();
```

```php /record/{record_uuid}_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://https/record/3cbdf225b91bb2fc4d729df34c38');

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

```csharp /record/{record_uuid}_example
using RestSharp;

var client = new RestClient("https://https/record/3cbdf225b91bb2fc4d729df34c38");
var request = new RestRequest(Method.DELETE);
IRestResponse response = client.Execute(request);
```

```swift /record/{record_uuid}_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://https/record/3cbdf225b91bb2fc4d729df34c38")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

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()
```