This API is depreciated. Please upgrade to our new improved 3.0 API. This API will continue to work for some time, but it is no longer supported and it will eventually go away.

Developer's API Documentation - Tasks

The Toodledo API makes it easy for developers to interact with their tasks and make new and interesting applications.

The Toodledo API uses a REST interface. REST is a simple format that allows you to make queries by constructing a URL and making an HTTP GET or POST. The server responds with an XML document containing the information that you requested.

The API documentation is split between these three pages:


Authentication and General API Tasks API Notebook API


Retrieving Tasks

The "getTasks" API call will return a list of the tasks that match your search parameters. The following search parameters may be set.

http://api.toodledo.com/api.php?method=getTasks;key=YourKey;shorter=130;
longer=10;priority=2;end=2

This returns a list of tasks that might look something like this.

<tasks num="2" total="45" start="0" end="2">
	<task>
		<id>1234</id>
		<parent>1122</parent>
		<children>0</children>
		<title>Buy Milk</title>
		<tag>After work</tag>
		<folder>123</folder>
		<context id="123">Home</context>
		<goal id="123">Get a Raise</goal>
		<added>2006-01-23</added>
		<modified>2006-01-25 05:12:45</modified>
		<startdate></startdate>
		<duedate modifier=""></duedate>
		<duetime>2:00pm</duetime>
		<starttime>1:00pm</starttime>
		<reminder>60</reminder>
		<completed></completed>
		<repeat>1</repeat>
		<rep_advanced></rep_advanced>
		<status>4</status>
		<star>0</star>
		<priority>2</priority>
		<length>20</length>
		<timer onfor="0">0</timer>
		<note></note>
	</task>
	<task>
		<id>1235</id>
		<parent>0</parent>
		<children>2</children>
		<title>Fix flat tire</title>
		<tag>before work</tag>
		<folder>456</folder>
		<context id="0"></context>
		<goal id="0"></goal>
		<added>2006-01-23</added>
		<modified>2006-01-23 15:45:55</modified>
		<startdate>2014-08-20</startdate>
		<duedate modifier="=">2014-08-20</duedate>
		<duetime>9:45am</duetime>
		<starttime>4:45am</starttime>
		<reminder></reminder>
		<completed>2014-08-20</completed>
		<repeat>50</repeat>
		<rep_advanced>Every Monday</rep_advanced>
		<status>2</status>
		<star>1</star>
		<priority>2</priority>
		<length>120</length>
		<timer onfor="123">600</timer>
		<note>Use the car jack</note>
	</task>
</tasks>

Most of the returned values should be self explanatory with a few exceptions. The value of the "repeat" field may have some special values. Values 0-9 will match the values listed above, but it can also have the value of 50, which indicates that the task uses advanced repeating. If this is the case, you will need to look at the "rep_advanced" field. Additionally, if the task is set to repeat from the completion date (instead of the original due-date), the repeat value will be incremented by 100. For example, a repeat value of 2 means repeat monthly from the due-date and a value of 102 means repeat monthly from the completion date.

The timer field also needs a little explanation. The value in the timer field indicates the number of seconds that have elapsed for the timer not including the current session. If the timer is currently on, the "onfor" value will contain a unix timestamp indicating the last time that the timer was started. Therefore, if the timer is currently on, you will need to calculate the elapsed time when you present it to the user. This calculation is: Total Time=timer+(now-onfor). Where "now" is a unix timestamp for the current time in Toodledo's timezone (which can be found with the "getServerInfo" API call).

"num" is the number of tasks in the current result set. "total" is the total number of tasks that would match your query if you did not use the "start" and "end" paramaters to paginate your results.


Adding Tasks

You can easily add a task to your list with the "addTask" API call. The title field is required, but all other fields are optional.

http://api.toodledo.com/api.php?method=addTask;key=YourKey;
title=new years;priority=1;repeat=0;length=30;duedate=2010-01-01

If the add was successful the id number of the new task will be returned.

<added>12345</added>

Editing Tasks

Edit a task using the "editTask" API call. The task id is required and can be found from the getTasks or addTask API calls. Omit any fields that you do not wish to set.

http://api.toodledo.com/api.php?method=editTask;key=YourKey;
id=12345;title=MyTask;completed=1;folder=123

If the edit was successful you will get the following message.

<success>1</success>

Deleting Tasks

The "deleteTask" API call will allow you to permanently delete a task. For tasks that you want available in the history section, or for tasks that you want to continue to repeat, you should not use this method. Instead, you should edit the task and mark it as completed.

http://api.toodledo.com/api.php?method=deleteTask;key=YourKey;id=12345;

If the delete was successful you will get the following message.

<success>1</success>

Get Deleted Tasks

The "getDeleted" API call will enable you to detect when a task was deleted on Toodledo, so you can also delete the task from your application.

http://api.toodledo.com/api.php?method=getDeleted;key=YourKey;after=2008-01-25 05:12:45

This returns a list of id numbers and datetime stamps.

<deleted>
	<task>
	<id>12345</id>
	<stamp>2008-02-25 07:46:42</stamp>
	</task>
	<task>
	<id>67890</id>
	<stamp>2008-03-12 14:11:12</stamp>
	</task>
</deleted>
Contact Us | Blog | API | Jobs | Press | Documentation | Forums Privacy | Terms | Copyright © 2004-2014