# Quickstart

Once a workspace is connected, you can start a round from a terminal before writing any bridge
code. Point the bridge URL in the dashboard at a request inspector to watch the events arrive.

## 1. Send a signed command

```sh
HIJINKS_SECRET='…'      # shown once when you connect
WORKSPACE='6f0c2b9e-…'   # from the inbound URL in the dashboard

BODY='{"type":"command","channel":"town-square","user":{"id":"u-maya","name":"Maya K."},"text":"start"}'
T=$(date +%s)
SIG=$(printf '%s.%s' "$T" "$BODY" | openssl dgst -sha256 -hmac "$HIJINKS_SECRET" | sed 's/^.* //')

curl -i "https://api.hijinks.team/hooks/$WORKSPACE" \
  -H 'Content-Type: application/json' \
  -H "Hijinks-Signature: t=$T,v1=$SIG" \
  --data-raw "$BODY"
```

Expect `HTTP/1.1 202` and `{"ok":true}`.

## 2. Watch the events arrive

A few seconds later your bridge URL receives a `message.create` with the start card, then a
`message.update` of that message with the first question. Both are described in
[Events](/events).

## 3. Answer the question

Sign and send an `action` with that message's `id` and one button's `action`, reusing the lines
that compute `T` and `SIG` and the `curl` call above:

```sh
BODY='{"type":"action","channel":"town-square","user":{"id":"u-maya","name":"Maya K."},"messageId":"msg_01JA2Z8KQ4M6V3XG5H7N9PRSTW","action":"answer_2_0"}'
```

## If it fails

A `401` means the signature does not match: check that the body you signed is byte-for-byte the
body you sent. A `409` means your clock is off. Every status is listed under
[Events your bridge sends](/events#events-your-bridge-sends).
