Create Account

Ensure you set HATSU_ACCESS_TOKEN correctly in the previous section first, otherwise you will not be able to use the Hatsu Admin API.

just

The easiest way to create an account is the just command line tool:

just account create example.com

If you are using docker, you need to exec to the container first.

docker exec -it hatsu /bin/bash

curl

You can also access the API via curl, as Justfile does.

curl -X POST "http://localhost:$(echo $HATSU_LISTEN_PORT)/api/v0/admin/create-account?token=$(echo $HATSU_ACCESS_TOKEN)" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"example.com\"}"