# Validate a dashboard definition

> Source: https://elaichi.ai/docs/api-reference/dashboards/dashboard/validatedashboarddefinition/

`POST /dashboard/validate`

Resource: **Dashboard** · API: **Dashboards**

## Request body

- **`definition`** _(unknown)_
- **`dashboard_id`** _(string)_

## Response body

- **`issues`** _(array<object>)_
  - **`severity`** _(string)_
  - **`step`** _(string,null)_
  - **`field`** _(string)_
  - **`message`** _(string)_

## Code examples

### curl

```bash
curl -X POST 'https://api.elaichi.ai/dashboard/validate' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"dashboard_id":"your_dashboard_id"}'
```

### JavaScript

```javascript
const body = {
  "dashboard_id": "your_dashboard_id"
};

const response = await fetch('https://api.elaichi.ai/dashboard/validate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/dashboard/validate"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "dashboard_id": "your_dashboard_id"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```
