# Add a row through a public form

> Source: https://elaichi.ai/docs/api-reference/dashboards/public/submitpublicdashboardform/

`POST /public/dashboard/{token}/widget/{key}/row`

Resource: **Public** · API: **Dashboards**

## Path parameters

- **`token`** _(string, required)_
  The unguessable link token
- **`key`** _(string, required)_
  Widget key

## Query parameters

- **`tz`** _(string)_
  The visitor's IANA time zone, for a read-only $today default. An unknown zone reads as UTC.

## Request body

- **`values`** _(object)_
- **`submission_id`** _(string)_
  One per submission: a retry with the same id replays the first write.
- **`turnstile_token`** _(string)_
  The Turnstile token (action public_form) the page solved; required when the deployment has a secret set, else 400 turnstile_failed.

## Response body

- **`result`** _(unknown)_
- **`row_id`** _(string,null)_
- **`replayed`** _(boolean)_
- **`message`** _(string)_
  The form's success message.

## Code examples

### curl

```bash
curl -X POST 'https://api.elaichi.ai/public/dashboard/<token>/widget/<key>/row' \
  -H 'Content-Type: application/json' \
  -d '{"values":{},"submission_id":"your_submission_id","turnstile_token":"your_turnstile_token"}'
```

### JavaScript

```javascript
const body = {
  "values": {},
  "submission_id": "your_submission_id",
  "turnstile_token": "your_turnstile_token"
};

const response = await fetch('https://api.elaichi.ai/public/dashboard/<token>/widget/<key>/row', {
  method: 'POST',
  headers: {
    '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/public/dashboard/<token>/widget/<key>/row"
headers = {
    "Content-Type": "application/json",
}
payload = {
    "values": {},
    "submission_id": "your_submission_id",
    "turnstile_token": "your_turnstile_token"
}

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