Shotstash
API referenceREST referenceSystem

First-run setup

Creates the first super admin once. Public and served before setup; rate limited to 10 per 15 minutes per IP. When the operator set SETUP_TOKEN the body must carry the same setupToken.

Try the REST routes against the public demo at https://demostash.aldyernesto.my.id. Get a read-only token (valid for 60 minutes), then paste it as the Bearer token in the console of any route.

POST
/api/v1/setup

Creates the first super admin once. Public and served before setup; rate limited to 10 per 15 minutes per IP. When the operator set SETUP_TOKEN the body must carry the same setupToken.

Request Body

application/json
  1. body
name*string

Display name, 1 to 80 characters.

email*string

Account email.

password*string

Password, 10 to 256 characters.

confirm*string

The same password again.

setupToken?|

Required when the operator set SETUP_TOKEN: the same value.

Response Body

Super admin created and setup complete

application/json
  1. response
ok*true

Always true.

Value intrue
curl -X POST "https://example.com/api/v1/setup" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "email": "string",    "password": "string",    "confirm": "string"  }'
{  "ok": true}