Habitica POST Request returning "[400] unexpected token t in json at position 0"

Here it is

The required Body Parameters need to be in a json structure in your request content. It’s a json string you need to build.

You must use json or xml in the request content body always.

See their example

{
    "text": "Update Habitica API Documentation - Tasks",
    "type": "todo",
    "alias": "hab-api-tasks",
    "notes": "Update the tasks api on GitHub",
    "tags": [
        "ed427623-9a69-4aac-9852-13deb9c190c3"
    ],
    "checklist": [
        {
            "text": "read wiki",
            "completed": true
        },
        {
            "text": "write code"
        }
    ],
    "priority": 2
}
1 Like