1

Using the REST API, I have no issues creating and updating task items in Todoist. However, I can't seem to remove a due date completely from an item.

This works for setting the due date:

{"due_date":"2020-01-20"}

I have tried the following for removing it with no luck.

{"due_string":"null"}
{"due_string":null}
{"due":{"date": null }}
{"due":{"string": null }}
{"due":null}
{"due":"null"}

How can I accomplish this?

fischgeek
  • 688
  • 1
  • 5
  • 18

3 Answers3

2

{ due_string: "no due date" } will do the trick.

Smokey1911
  • 21
  • 3
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 24 '22 at 04:51
0

Have you tried {"due": null}?

According to the API spec it should work.

vonschlager
  • 324
  • 1
  • 6
  • Sorry, forgot to add that one to my list. That works when you're creating the task, but not updating it to remove just the due attribute. Thanks though. – fischgeek Jan 19 '20 at 23:37
0

If you're using Python to generate the request, and depending on how you generate the actual request, you might consider using the None keyword.

M--
  • 25,431
  • 8
  • 61
  • 93
Frost
  • 1
  • 2