Skip to content
POST /dashboard/{id}/public-link

Requires dashboard:publish and the org setting. 403 public_links_disabled, 400 validation_error for rows_editable without forms_enabled, 409 public_link_no_forms / public_link_no_editable_forms / public_link_consent_stale / public_link_limit / public_filter_variants_too_many / public_filter_variants_too_slow, 413 public_snapshot_too_large. The URL is returned once.

Path Parameters

idstring
required·

Resource id

Request Body

consentobject
required
dashboard_revisioninteger

The revision the preview was made from.

editable_widget_keysstring[]

The forms whose rows visitors may see and change: a second, separate agreement, required when row edits are on.

widget_keysstring[]

The widgets the preview showed.

expires_in_daysinteger

1 to 365, default 90; there is no "never".

forms_enabledboolean

Visitors may fill in the dashboard's forms.

live_tablesboolean

Viewers may filter, sort, page and export the link's tables live; every query runs as the publisher (snapshot_by). Default false. The preview's live_tables.notice is the consent text to show.

pagesstring[]

Page keys; all pages when left out.

refreshstring

daily is accepted as interval every 24 hours.

Possible values:
manualautomationintervaldaily
refresh_interval_hoursinteger

Required with refresh interval; only with it.

Possible values:
161224
rows_editableboolean

Visitors may also see and change the rows of the forms that edit rows. 400 validation_error without forms_enabled.

curl -X POST 'https://api.elaichi.ai/dashboard/<id>/public-link' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"pages":[],"refresh":"manual","refresh_interval_hours":1,"expires_in_days":0,"forms_enabled":true,"rows_editable":true,"consent":{},"live_tables":true}'
const body = {
  "pages": [],
  "refresh": "manual",
  "refresh_interval_hours": 1,
  "expires_in_days": 0,
  "forms_enabled": true,
  "rows_editable": true,
  "consent": {},
  "live_tables": true
};

const response = await fetch('https://api.elaichi.ai/dashboard/<id>/public-link', {
  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);
import os
import requests

url = "https://api.elaichi.ai/dashboard/<id>/public-link"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "pages": [],
    "refresh": "manual",
    "refresh_interval_hours": 1,
    "expires_in_days": 0,
    "forms_enabled": True,
    "rows_editable": True,
    "consent": {},
    "live_tables": True
}

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