Use the REST API
-
Get a key and keep it in your local environment as
SH_KEY.For an account key, open Account, Danger zone, then New key. Confirm that this replaces your old key and disconnects connected apps. For team publishing, use Website, then Advanced: command line and API key instead.
-
Read your account from a terminal:
curl -H "X-API-Key: $SH_KEY" https://simple-hack.app/v1/me -
Publish one file.
With your team’s key, replace
TEAMwith the site name shown under Website:curl -X PUT 'https://simple-hack.app/v1/sites/TEAM/files?create=1' \ -H "X-API-Key: $SH_KEY" -H 'Content-Type: application/json' \ --data '{"files":{"index.html":"<!doctype html><h1>Hello</h1>"}}' -
Read
codein an error body shaped as{"error":"...","code":"..."}. Branch on the code, and displayerrorto the person. HonorRetry-Afterbefore retrying a limited request.
Announcement POST accepts optional pinned; PUT accepts pinned alone to pin/unpin or title and body together to edit. GET and the public event feed return body_html (safe HTML to insert as-is) and pinned, pinned first. The organiser-only POST /v1/hack/events/{slug}/announcements/preview takes body and returns body_html without saving. The MCP equivalents are hack_post_announcement, hack_edit_announcement and hack_get_announcements, using a body object for writes. Text supports labelled links [label](https://...), bold, bullets and line breaks; only http/https links. Standalone Zoom, Meet, Teams and YouTube addresses become cards. YouTube thumbnails come from i.ytimg.com.