> This page is for API.

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

# Override Data Classes

PATCH https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/resources/{id}/data-classifications
Content-Type: application/json

Manually sets a resource's data classes, overriding auto-classification.

You can revert to auto-classification of data classes by calling [Remove Data Classes Override](remove-data-classes-override) for the same resource.


Reference: https://docs.eon.io/api/api-reference/resources/data-classes/override-data-classes

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `projectId` (string, required) — ID of the project the resource is in. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `id` (string, required) — Eon-assigned ID of the resource to override.

### Body (application/json)

This endpoint expects an OverrideDataClassificationsRequest.

- `dataClasses` (list of string, optional) — List of data classes to set.

## Response

### 200

Data classes overridden.

- `dataClasses` (list of string, optional) — List of data classes that were overridden.

## Errors

### 404 Not Found Error

Resource wasn't found.

- `any`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "dataClasses": [
    "PII"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/resources/1ee34dc5-0a7c-4e56-a820-917371e05c8d/data-classifications"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/resources/1ee34dc5-0a7c-4e56-a820-917371e05c8d/data-classifications';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/resources/1ee34dc5-0a7c-4e56-a820-917371e05c8d/data-classifications")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```