Board Thread:The Quarters - Q & A/@comment-24997713-20140529053609/@comment-24150802-20140529070009

For an initial, brief reply, here's an example taken from my own shell scripts. It doesn't do exactly as you have requested (e.g., it's a to-do, with a tag, and with no repeat) however it's probably enough to start you off. The best way to find the syntax for any type of task is to use the API's "user" GET request which will return all of your current tasks, and then you can copy the syntax from a task that is similar to the one you want to create.

URL to post to: https://habitrpg.com:443/api/v2/user/tasks

headers: Content-Type:application/json x-api-user: d904...e265 x-api-key: a10b...1234

JSON data: {"text":"title goes here","type":"todo","value":"0", "tags": { "f267...1a62": true }, "notes":"Notes go here."}

Here's the entire thing as a shell command (when executed, it would be all on one line; the line breaks below are only for readability):

curl https://habitrpg.com:443/api/v2/user/tasks -s -X POST --compressed -H "Content-Type:application/json" -H "x-api-user: d904...e265" -H "x-api-key: a10b...1234" -d "{ \"text\":\"title goes here\",\"type\":\"todo\",\"value\":\"0\", \"tags\": { \"f267...1a62\": true }, \"notes\":\"Notes go here.\" }"