Skip to Content
Hookboard
Reference

Actions reference

Every action a button or input can run, with its fields.

An action is an object with a type. Put one, or a list of them, on a property that takes an action, such as a button's onPress. A list runs in order. For how they fit together, see Actions.

webhook

Hookboard calls your URL. The reply may contain effects. Runs on Hookboard's server.

FieldTypeRequiredWhat it is
urlstringyesAddress to call.
method"POST" "PUT" "PATCH" "DELETE"POST (default), PUT, PATCH or DELETE.
namestringA name for the action, sent in the body.
payloadany JSONAny JSON; expressions are resolved first.
headersobjectExtra request headers.
confirmobjectAsk first: { title, description, confirmLabel }.
onSuccessEffectsEffects applied when the reply has none.
onErrorEffectsEffects applied when the call fails.
{
  "type": "webhook",
  "url": "https://your-app.example/hook"
}

event

Queues an event your app collects from GET /api/v1/events. For senders that cannot receive webhooks. Runs on Hookboard's server.

FieldTypeRequiredWhat it is
namestringyesEvent name.
payloadany JSONAny JSON; expressions are resolved first.
confirmobjectAsk first: { title, description, confirmLabel }.
onSuccessEffectsEffects applied once the event is queued.
{
  "type": "event",
  "name": "refresh"
}

set

Writes a value to local state. Runs on the device, with no request.

FieldTypeRequiredWhat it is
pathstringyesState path, e.g. state.tab.
valueany JSONThe value; may be an expression.
{
  "type": "set",
  "path": "state.value"
}

toggle

Flips a true/false value in local state. Runs on the device, with no request.

FieldTypeRequiredWhat it is
pathstringyesState path.
{
  "type": "toggle",
  "path": "state.value"
}

increment

Adds to a number in local state. Runs on the device, with no request.

FieldTypeRequiredWhat it is
pathstringyesState path.
bynumber or string or DynamicAmount to add; 1 by default.
{
  "type": "increment",
  "path": "state.value"
}

append

Adds an item to a list in local state. Runs on the device, with no request.

FieldTypeRequiredWhat it is
pathstringyesState path of the list.
valueany JSONThe item; may be an expression.
{
  "type": "append",
  "path": "state.value"
}

remove

Removes an item from a list in local state. Runs on the device, with no request.

FieldTypeRequiredWhat it is
pathstringyesState path of the list.
indexnumber or string or DynamicPosition to remove; may be an expression such as {{index}}.
{
  "type": "remove",
  "path": "state.value"
}

openUrl

Opens a link in a new tab. Runs on the device, with no request.

FieldTypeRequiredWhat it is
urlstringyesAddress to open.
{
  "type": "openUrl",
  "url": "https://your-app.example/hook"
}

copy

Copies text to the clipboard. Runs on the device, with no request.

FieldTypeRequiredWhat it is
textstringyesThe text.
{
  "type": "copy",
  "text": "…"
}

toast

Shows a short message. Runs on the device, with no request.

FieldTypeRequiredWhat it is
messagestringyesThe message.
tone"default" "success" "danger"default, success or danger.
{
  "type": "toast",
  "message": "…"
}

dismiss

Removes this card. Runs on the device, with no request.

No fields.

{
  "type": "dismiss"
}

On this page