What it does
Update a visitor action. Send the fields that change. Changing kind starts the spec over from the fields you send. An action that is already public can be edited when can_public_actions is off, so access can move away from public. Setting access to public needs the right.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
site_idrequired | string | The id of the site. list_sites gives the ids of your sites. |
namerequired | string | The action to change. |
table | string | A different table for the action. |
kind | one of: toggle, set, fixed, edit, add, delete | A new kind: toggle, set, fixed, edit, add or delete. |
access | one of: off, owner, share, share_review, public, member_own, member_all | Who may run it: off, owner, share, share_review, public, member_own or member_all. |
column | string or null | The column a toggle or set action writes. |
allowed | array of string | For set: the values a visitor may choose. |
when | object | For set: other columns to write for each chosen value. |
set | object | Fixed column values written every time the action runs. |
params | array of objects | For fixed: bounded numbers a visitor chooses, each with name, min, max and column. |
fields | array of string or object | For edit and add: the columns a visitor may write. |
Example
Call update_action with these arguments:
{
"site_id": "01a1…",
"name": "toggle_done",
"access": "member_all"
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- What visitor actions areNamed, limited changes people make from a page.
- Tick, edit, add and deleteThe kinds of action, and when to use each.