Version 1 of the Taskforce API is brand new and currently in beta testing. It should be easy to get up and running, but if you run into any problems then email us.
The API consists of HTTP endpoints accessed via GET and POST. SSL is required, so make sure to use https instead of http.
We require basic HTTP authentication for almost every call. The user's email address serves as the username, and the user's API key serves as the password.
Note: Some browsers don't allow the use of the "@" symbol during basic HTTP authentication, which obviously conflicts with using an email address as a username. In order to get around this issue, you can send "(at)" in place of "@". For example, a user with email "test@test.com" can be authenticated with the username "test(at)test.com".
Responses will be in XML format by default, or JSON if ".json" is added to
the endpoint. For example, /api/v1/user.json
will return a JSON response, and /api/v1/user
will return an XML response (as will
/api/v1/user.xml).
Note that XML responses will always be wrapped in a
<response> stanza. Also, any underscores
that appear in a JSON attribute name
(api_key: "12345") will be hyphens in the XML
version of the response
(<api-key>12345</api-key>).
We've developed a PHP library for accessing the API, and are working on libraries in other languages as well. If you'd like to see a library, or if you've written one of your own, let us know!
Creates an account for a new Taskforce user.
{
success: true,
api_key: "new user's API key"
}
Retrieves information about the user.
{
success: true,
user: {
name: "John Doe",
email: "johndoe@test.com",
created: "2010-11-23 17:04:20 -0800",
service: "Google Apps",
api_key: "user's API key"
}
}
Retrieves all tasks that belong to the user.
{
success: true,
tasks: [
{
id: 23416,
user_id: id of the user who created the task,
owner: was task created by the authenticated user?,
name: "file the TPS reports",
seen: has the task been seen in the Taskforce widget?,
due_at: "12/02/2010",
completed_at: "12/01/2010",
delayed_until: "11/30/2010",
created: "2010-11-23 17:04:20 -0800",
modified: "2010-11-23 17:04:20 -0800",
lists: [
{
id: 125
},
...
],
collaborators: [
{
email: "johndoe@test.com"
},
...
],
emails: [
{
sender: "johndoe@test.com",
subject: "read this report and get back to me",
gmail_thread_id: "Gmail thread id of the email",
},
...
]
},
...
]
}
Creates a new task.
Required parameters: name, list_id
Optional parameters: details
{
success: true,
task_id: id of the new task
}
Retrieves a single task.
Required parameters: id
{
success: true,
task: {
id: 24572,
user_id: id of the user who created the task,
owner: was task created by the authenticated user?,
name: "file the TPS reports",
seen: has the task been seen in the Taskforce widget?,
due_at: "12/02/2010",
completed_at: "12/01/2010",
delayed_until: "11/30/2010",
created: "2010-11-23 17:04:20 -0800",
modified: "2010-11-23 17:04:20 -0800",
lists: [
{
id: 2347
},
...
],
collaborators: [
{
email: "johndoe@test.com"
},
...
],
emails: [
{
sender: "johndoe@test.com",
subject: "read this report and get back to me",
gmail_thread_id: "Gmail thread id of the email",
},
...
]
}
}
Updates the task's attributes. Only the attributes specified will be changed.
Required parameters: id
Optional parameters: name, details
{
success: true
}
Returns the number of tasks belonging to the user broken down into the following categories: active, complete, delayed, unseen, and total. (Note that the total is just the sum of active, complete, and delayed.)
{
success: true,
task_counts: {
total: 100,
active: 50,
complete: 25,
delayed: 25,
overdue: 10,
unseen: 3
}
}
Adds a collaborator to the task.
Required parameters: email
{
success: true
}
Removes a collaborator from the task.
Required parameters: email
{
success: true
}
Marks the task as complete.
{
success: true
}
Marks the task as incomplete.
{
success: true
}
Sets a due date for the task. Note the date should be in the format "MM/DD/YYYY".
Required parameters: date
{
success: true,
date: "03/22/2012"
}
Sets a start date for the task. (This is refered to as the "delay date" by the main Taskforce application.) Note the date should be in the format "MM/DD/YYYY".
Required parameters: date
{
success: true,
date: "03/22/2012"
}
Adds the task to the specified list.
Required parameters: list_id
{
success: true
}
Removes the task from the specified list.
Required parameters: list_id
{
success: true
}
Adds a comment to the task. Note that comments are individual chat-like messages.
Required parameters: comment
{
success: true
}
Connects the task to an email.
Required parameters: gmail_thread_id
Optional parameters: subject, sender
{
success: true
}
Disconnects an email from the task.
Required parameters: gmail_thread_id
{
success: true
}
Deletes the task.
{
success: true
}
Retrieves all of the user's lists.
{
success: true,
lists: [
{
id: 512,
name: "Business Tasks",
description: "Tasks that have to do with business",
flagship: is this the user's default (un-deletable) list?,
added_by: id of user who created the list,
created: "2010-11-23 17:04:20 -0800",
modified: "2010-11-23 17:04:20 -0800",
collaborators: [
{
email: "email of someone collaborating on the list"
},
...
],
task_counts: {
total: 100,
active: 50,
complete: 25,
delayed: 25,
overdue: 10,
unseen: 3
}
},
...
]
}
Creates a new list.
Required parameters: name
Optional parameters: description
{
success: true,
list_id: id of the new list
}
Retrieves the specified list.
{
success: true,
list: {
id: 512,
name: "Business Tasks",
description: "Tasks that have to do with business",
flagship: is this the user's default (un-deletable) list?,
added_by: id of user who created the list,
created: "2010-11-23 17:04:20 -0800",
modified: "2010-11-23 17:04:20 -0800",
collaborators: [
{
email: "email of someone collaborating on the list"
},
...
],
task_counts: {
total: 100,
active: 50,
complete: 25,
delayed: 25,
overdue: 10,
unseen: 3
}
}
}
Updates the list's attributes. Only the attributes specified will be changed.
Required parameters: name and/or description
{
success: true
}
Retrieves all tasks that belong to the list.
{
success: true,
tasks: [
{
id: 23416,
user_id: id of the user who created the task,
owner: was task created by the authenticated user?,
name: "file the TPS reports",
seen: has the task been seen in the Taskforce widget?,
created: "2010-11-23 17:04:20 -0800",
modified: "2010-11-23 17:04:20 -0800",
lists: [
{
id: 125
},
...
],
collaborators: [
{
email: "johndoe@test.com"
},
...
],
emails: [
{
sender: "johndoe@test.com",
subject: "read this report and get back to me",
gmail_thread_id: "Gmail thread id of the email",
},
...
]
},
...
]
}
Rearrange the tasks in the list (they'll appear in the same order that they're specified in the array passed to this method). Only active (not completed, not delayed, not deleted) tasks will be reordered. Any active tasks that are part of the list but aren't included in the parameters will be added to the end.
Required parameters: task_ids
{
success: true
}
Adds a collaborator to the list.
Required parameters: email
{
success: true
}
Removes a collaborator from the list.
Required parameters: email
{
success: true
}
Deletes a list. Any tasks that are part of a deleted list will be deleted as well (unless they also belong to other lists).
{
success: true
}