2 quick notes:
This requires the program curl, but it comes with macOS and lots of Linuxes.
This would leave your API key (which is sorta like a password) in your history file on your computer. If you have a reason to not be OK with this, then, uh, remove it, I guess, or don’t do this? Maybe your computer is shared with mischevious people who try to peek into your stuff, or you are always streaming to the public and they’ll see your API key as you type this and then go and mark all your goals as done and you’ll lose out on being as awesome as you could be?
OK, all that being said:
Get your API key. Go to https://www.beeminder.com/api/v1/auth_token.json, and there’s a part in quotes at the end (not username, not your username, and not auth_token). That’s like a password. Don’t share it with folks.
Open a terminal, and (after tweaking for your circumstances), paste in the following, and then hit enter.
curl -X POST https://www.beeminder.com/api/v1/users/me/goals.json \
-d auth_token=AUTHTOKENGOESHERE \
-d slug=exercise \
-d title=Work+Out+More \
-d goal_type=hustler \
-d goaldate=1400000000 \
-d gunits=workouts \
-d rate=5 \
You can edit or tweak basically all of those, after auth_token. See Beeminder API Reference for details on each one.
hustler, for instance, is “Do More”. goaldate is in “epoch seconds”, or seconds since January 1 1970*. https://www.epochconverter.com/ can help you out.
“Exactly two out of three of
goalval , and
rate are required”. I’m not sure if you can leave out the missing one or if you have to explicitly set it to null, but the example has the goalval set to null.
If you’d like, I can play around with Shortcuts and see what that looks like for something like this. Let me know!
Depending on what you’re doing, it may make sense to make the goal roughly correct, and then tweak it on the website.