Skip to Content
Hookboard

Cards

Every field of a card, how ids and updates work, and the difference between the feed and the board.

A card is the JSON body you send to POST https://app.hookboard.dev/api/v1/cards. Here's one that reports on a nightly backup:

{
  "id": "backup-nightly",
  "target": "feed",
  "title": "Nightly backup",
  "data": { "size": "4.2 GB", "took": 312 },
  "ui": {
    "type": "keyValue",
    "items": [
      { "label": "Size", "value": "{{data.size}}" },
      { "label": "Took", "value": "{{round(data.took / 60)}} min" }
    ]
  },
  "notify": true,
  "expiresAt": 86400
}

Fields

FieldTypeRequiredWhat it is
uielementyesThe tree of elements to draw. See Components.
idstring, 1 to 200 charactersnoA stable id you choose. Sending it again updates the card in place.
target"feed" or "board"noWhere the card goes. Default "feed".
feedstringnoFeed cards only: the short name of the feed to put it in. Left out, the card goes in the workspace's first feed, Main; when updating a card, it stays in the feed it's already in.
boardstringnoBoard cards only: the short name of the board to put it on. Left out, the card goes on the workspace's first board, Main; when updating a card, it stays on the board it's already on.
titlestring, up to 200 charactersnoShown at the top of the card, next to your app's name and icon.
dataobjectnoValues the ui reads with {{data.…}}. See Data, state and bindings.
stateobjectnoStarting values for the card's local state.
size{ "w": 1–12, "h": 0–12 }noBoard cards only: starting size, w in columns of the board's 12-column grid and h in 96px rows. Leave h out, or send 0, to fit the content.
notifytrue, or { "title": "…", "body": "…" }noSends a push notification. An object sets its text; otherwise the card's title and a summary of its text are used.
expiresAtISO date string, or a number of seconds from nownoThe card removes itself at this time.
filesobjectno{ "name": null } removes a file from the card. Files are added by sending the card as multipart/form-data; see Files.

Ids and updates

Every card gets an id from Hookboard, returned as id. If you also send your own id, it comes back as externalId, and you can use either one in paths such as /cards/{id}.

Your id only needs to be unique among the cards of one app (one API key).

Workspaces and boards

An API key belongs to one workspace. The people in that workspace see everything the key sends.

A workspace has one or more feeds and one or more boards. Each has a short name, such as main, alerts or ops. To send a card to a particular one, name it:

{
  "id": "disk-full",
  "feed": "alerts",
  "title": "Disk almost full",
  "notify": true,
  "ui": { "type": "text", "value": "db-1 is at 94%." }
}
{
  "id": "queue-depth",
  "target": "board",
  "board": "ops",
  "title": "Queue",
  "data": { "depth": 12 },
  "ui": {
    "type": "stat",
    "label": "Jobs waiting",
    "value": "{{data.depth}}"
  }
}

GET https://app.hookboard.dev/api/v1/feeds and GET https://app.hookboard.dev/api/v1/boards list the feeds and boards your key can use. Name one that doesn't exist and you get a 404. Hookboard won't create it for you.

Everyone who can see a feed shares it. Each person has their own unread state, but dismissing a card removes it for everyone. A card's status in the API stays unread until someone reads it.

A feed is either open to everyone in the workspace or limited to chosen people (owners and admins always see it). GET /feeds reports which one as access. On a limited feed, cards and their notifications reach only the chosen people. Anyone can also mute a feed's notifications for themselves, so treat notify as a request that may be turned down.

You want toDo this
Create a card, or replace it if it existsPOST /cards with the same id
Change only some fieldsPATCH /cards/{id} with those fields
Change only values in dataPATCH /cards/{id}/data with an object to merge; null removes a key
Remove a cardDELETE /cards/{id}

Posting a feed card again with the same id marks it unread and bumps it to the top. Posting a board card again only refreshes it. It stays wherever people put it.

Feed and board

FeedBoard
target"feed" (default)"board"
Use it forThings to see once and act on: alerts, approvals, resultsThings to look at repeatedly: status, numbers, controls
People canRead it, dismiss itMove it, resize it, remove it
Kept forUntil dismissed; dismissed cards are deleted after 30 days. Only the newest are kept: 100 per feed on Free, 10,000 on Pro.Until removed
Which oneA workspace can have several feeds; feed picks oneA workspace can have several boards; board picks one
sizeIgnoredStarting size. Once someone resizes it, their size wins.

Notifications

"notify": true sends a push notification to every device where notifications are switched on. Nothing is sent if your app's notifications are turned off in Settings, and anyone who muted the feed doesn't get one either. Notifications go out when the card is posted, not when you patch its data.

Limits

LimitValue
Size of ui as JSON256 KB
Elements in one ui1500
Nesting depth24 levels
title200 characters

A card over any of these is rejected. See Errors and limits.

On this page