Hijinks Webhook API
Hijinks Webhook API
Play every Hijinks game on any chat tool through a bridge you write.
A bridge is a small HTTP service you run next to your chat tool. It and Hijinks exchange signed JSON, and that is the whole API:
| Call | Sent by | |
|---|---|---|
| Inbound | POST /hooks/{workspaceId}: a member ran a command, pressed a button or typed something | Your bridge |
| Outbound | Five events POSTed to your bridge URL: post a message, replace it, show it to one member, DM it, test | Hijinks |
| Polling | GET /hooks/{workspaceId}/events: fetch the outbound events instead, for a bridge with no public address | Your bridge |
Every request, and every poll's answer, carries Hijinks-Signature,
made with the workspace's one secret: Verify signatures.
New here? The Quickstart starts a game with one signed curl, and Events walks through a round.
Private beta. Hijinks is not public yet, and this contract may
change before launch. Ignore fields you do not recognise: new fields and
new kind values may be added without notice.
Tags
Inbound
Events a bridge sends to Hijinks.
Polling
Outbound events fetched by a bridge that cannot receive them.
Outbound
Events Hijinks sends to your bridge (
webhooks). Each is a signed
POST to the one bridge URL you set in the dashboard. type in the
body says which event it is.
- Answer any
2xxwithin 5 seconds. Otherwise the event is sent again after 1 and 4 seconds with the sameid, then dropped — so dedupe onid. Apingis sent once. - Events for one
message.idarrive one at a time, in order. An update that a newer one has overtaken is not sent, and neither are the updates of a create Hijinks gave up on. - An event is not sent once it is no longer worth showing: when it is
60 seconds old for
message.ephemeralandping, or 10 minutes old for a live game's messages and the answers to commands. Prompts and results that stay valid for hours (self-paced rounds, word games, icebreakers, digests) never go stale.
Webhooks
message.create
Post a message to a channel
POST
message.update
Replace a message Hijinks created
POST
message.ephemeral
Reply that only one member should see
POST
dm.create
Send a member a private message
POST
ping
Test event
POST