curl
With curl you can try every request on the command line before you put it into a button or an automation. All answers are JSON; the API documentation describes the fields.
Put the token into the environment once:
export HORAKA_TOKEN='YOUR_TOKEN'
Start the timer, with an Idempotency-Key against double starts:
curl -X POST https://api.horaka.com/v1/track/start \
-H "Authorization: Bearer $HORAKA_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"project": "PROJECT", "activity": "ACTIVITY"}'
Toggle, switch and stop:
curl -X POST https://api.horaka.com/v1/track/toggle -H "Authorization: Bearer $HORAKA_TOKEN" -H "Content-Type: application/json" -d '{"project": "PROJECT"}'
curl -X POST https://api.horaka.com/v1/track/switch -H "Authorization: Bearer $HORAKA_TOKEN" -H "Content-Type: application/json" -d '{"project": "PROJECT"}'
curl -X POST https://api.horaka.com/v1/track/stop -H "Authorization: Bearer $HORAKA_TOKEN"
Status as a sentence and as JSON:
curl "https://api.horaka.com/v1/track/status?format=text" -H "Authorization: Bearer $HORAKA_TOKEN"
curl https://api.horaka.com/v1/timer -H "Authorization: Bearer $HORAKA_TOKEN"