Skip to content

Change how a public link updates, its live tables, and what visitors may do on it

PATCH /dashboard/{id}/public-link/{linkId}

Strict body; changes apply in this order: forms_enabled, rows_editable, then the refresh mode and live_tables, each only when sent. Turning forms or row edits ON is publishing again: it needs the Elaichi app, `dashboard:publish`, the org setting and `consent` (required, and allowed only then); it captures as the caller, who becomes the person the link runs as, and brings a suspended link back. 409 public_link_forms_off, public_link_expired, public_link_no_forms, public_link_no_editable_forms, public_link_consent_stale. Turning them OFF needs only manage (console): the organization row, which accepts writes, changes first, then the page; 502 public_link_update_failed when the page step fails, and a retry repairs it. Changing refresh or switching live_tables on requires dashboard:publish and the org setting, and that you are the link's current publisher (`can_change_refresh` / `can_enable_live_tables`); 403 public_link_not_publisher otherwise (refresh the link first to take it over). Switching live_tables off needs only can_manage. 400 public_link_no_feeding_automation when refresh is workflow and no workflow writes a collection the dashboard reads.

Path Parameters

idstring
required·

Resource id

linkIdstring
required·

Resource id

Request Body

consentobject
required·

Required when forms_enabled or rows_editable is turned on, and allowed only then.

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.

forms_enabledboolean

Turning it on is publishing again: it needs the consent. Turning it off needs only manage, and also clears rows_editable.

live_tablesboolean

Viewers may filter, sort, page and export the link's tables live; every query runs as the publisher (snapshot_by). Switching on needs what refresh needs and that you are the current publisher (can_enable_live_tables); switching off needs only can_manage.

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

Turning it on needs forms on and the consent; turning it off needs only manage.

Response Body

can_change_refreshboolean

Only the link's current publisher (the person whose Update now made its current copy) may change how it updates; everyone else with can_refresh takes it over with refresh first.

can_enable_formsboolean

can_refresh, the link not expired, and form_count above 0.

can_enable_live_tablesboolean

May the caller switch live_tables on: the same rule as can_change_refresh. Switching off needs only can_manage.

can_enable_row_editsboolean

Also needs forms on and edit_form_count above 0.

can_manageboolean
can_refreshboolean
can_refresh_nowboolean

May the caller refresh the data now without a review: the link is live and the caller is its current publisher. Everyone else uses refresh with a consent, which takes the link over.

change_refresh_blocked_reasonstring,null
created_atstring
created_bystring
dashboard_idstring
edit_form_countinteger

Forms on the link's pages whose edit_rows is not off.

enable_live_tables_blocked_reasonstring,null
expires_atstring
feeding_automation_countinteger
feeding_automationsobject[]

At most 5 workflows that write a collection the dashboard reads, among those the caller may see.

enabledboolean
idstring
namestring
form_countinteger

Form widgets on the link's pages of the published dashboard; 0 means there is nothing to switch on.

forms_blocked_reasonstring,null
forms_enabledboolean

Visitors may fill in the dashboard's forms.

forms_problemstring,null

With forms on and the link live: why entries are refused right now, one sentence; null when they are taken.

hidden_countinteger
idstring
live_tablesboolean

Viewers may filter, sort, page and export the link's tables live; every query runs as the publisher (snapshot_by).

next_refresh_atstring,null

When the next capture of this link is due, or null when none is waiting. Reflects only the requests the link has received: a workflow run that finishes inside the workflow's own 15-minute gap arms a timer first and has not asked yet, so the link can show nothing pending for up to 15 minutes after such a run.

pagesstring[]
recommended_refreshstring
Possible values:
automationinterval
refreshstring
Possible values:
manualautomationinterval
refresh_blocked_reasonstring,null
refresh_interval_hoursinteger,null

Set exactly when refresh is interval.

Possible values:
161224null
refresh_now_blocked_reasonstring,null
refresh_pending_reasonstring,null

Why next_refresh_at is waiting: a workflow run asked inside the 15-minute minimum gap since the last capture (min_gap), the last capture failed and is retried (retry_after_failure), or the link's own schedule (interval).

Possible values:
min_gapretry_after_failureintervalnull
row_edits_blocked_reasonstring,null
rows_editableboolean

Visitors may see and change the rows of the link's editable forms.

shown_countinteger
snapshot_atstring,null

When the copy that is being served was captured.

snapshot_bystring,null
snapshot_by_display_namestring,null
statusstring
Possible values:
activepausedsuspendedexpiredrevoked
suspended_reasonstring,null
Possible values:
publisher_invalidpublisher_leftsettings_offdashboard_changednull
curl -X PATCH 'https://api.elaichi.ai/dashboard/<id>/public-link/<linkId>' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"refresh":"manual","refresh_interval_hours":1,"live_tables":true,"forms_enabled":true,"rows_editable":true,"consent":{}}'
const body = {
  "refresh": "manual",
  "refresh_interval_hours": 1,
  "live_tables": true,
  "forms_enabled": true,
  "rows_editable": true,
  "consent": {}
};

const response = await fetch('https://api.elaichi.ai/dashboard/<id>/public-link/<linkId>', {
  method: 'PATCH',
  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/<linkId>"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "refresh": "manual",
    "refresh_interval_hours": 1,
    "live_tables": True,
    "forms_enabled": True,
    "rows_editable": True,
    "consent": {}
}

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