Skip to Content
Hookboard

Quickstart

Create a key, send a card, and make its button call you back.

1. Create an API key

Sign in at https://app.hookboard.dev, open Settings, go to API keys and choose New API key. Name it after whatever will send the cards. You'll see the key once, so copy it somewhere safe. It starts with hb_.

Keep the key in an environment variable. The examples below read it from HOOKBOARD_KEY.

2. Send a card

curl https://app.hookboard.dev/api/v1/cards \
  -H "Authorization: Bearer $HOOKBOARD_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "hello",
    "title": "Hello",
    "ui": { "type": "text", "value": "Sent with one request." }
  }'

The reply is 201 with the card's ids:

{
  "id": "kq3Zc0mB1xY8aQ2d",
  "externalId": "hello",
  "target": "feed",
  "created": true
}

And there it is, in your feed:

3. Update it

Send the same id again and the card is replaced in place. The reply is 200 with "created": false.

To change only the values a card shows, patch its data. It's the cheapest way to keep a widget fresh:

curl -X PATCH https://app.hookboard.dev/api/v1/cards/hello/data \
  -H "Authorization: Bearer $HOOKBOARD_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "count": 42 }'

4. Add a button that calls you

This card shows a note with a Delete button. Pressing it asks for confirmation, then Hookboard's server sends DELETE to your URL.

{
  "id": "note-123",
  "title": "New note",
  "data": { "noteId": 123, "text": "Buy oat milk" },
  "ui": {
    "type": "stack",
    "children": [
      { "type": "text", "value": "{{data.text}}" },
      {
        "type": "button",
        "label": "Delete",
        "variant": "danger",
        "onPress": {
          "type": "webhook",
          "method": "DELETE",
          "url": "https://your-app.example/api/notes/{{data.noteId}}",
          "confirm": { "title": "Delete this note?" },
          "onSuccess": "dismiss"
        }
      }
    ]
  }
}

Any 2xx answer from your URL runs onSuccess, which here removes the card. Your answer can also tell Hookboard what to do next. See Webhooks.

If your code has no public address, use an event action and collect presses by polling. See Events.

5. Put it on the board

Add "target": "board" and the card becomes a widget that stays on the board instead of a feed item you read and dismiss:

{
  "id": "visitors",
  "target": "board",
  "title": "Visitors",
  "size": { "w": 3 },
  "data": { "today": 1284 },
  "ui": {
    "type": "stat",
    "label": "Today",
    "value": "{{data.today}}"
  }
}

Next

  • Cards lists every field.
  • Components lists everything a ui can contain.
  • Typed clients generates a client that checks your cards as you write them.

On this page