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.
NAME="example.com" curl -X POST "http://localhost:$(echo $HATSU_LISTEN_PORT)/api/v0/admin/create-account?name=$(echo $NAME)&token=$(echo $HATSU_ACCESS_TOKEN)"