Use the REST API
-
Get a key and keep it in your local environment as
SH_KEY.Open your sites page, Settings, then Keys. Name the key, press Create key, and copy it when shown.
-
Read your account from a terminal:
curl -H "X-API-Key: $SH_KEY" https://simple-host.app/v1/me -
Publish one file.
curl -X POST https://simple-host.app/v1/sites/hello/files \ -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.