+ Add Question

Need a COMPLETE sample of using curl to post a task...


Parameters for sample:
Project: Tara
Date: 12/31/2012
Label: psd
Task: Call Jim Smith / ReAquisition
Notes: Call Jim @ 212-555-1212 at 3:00pm

All responses

David Trey  staff
Replied on Nov 15, 2012 - 11:47 UTC


Please take a look at this website explaining how to do this in detail: https://httpkit.com/resources/HTTP-from-the-Command-Line/

Furthermore, please refer to our API documentation for more information: https://todoist.com/API/help

Best regards,

PLM CSR  premium
Replied on Nov 15, 2012 - 12:00 UTC

Hi David -- OK, I reviewed those, but PLEASE SIMPLY GIVE ME AN EXAMPLE that will work. I have a time sensitive project and since you all are completely familiar with your program, would it be too much to ask for a working example to jump start this for me? PLEASE! Did I say PLEASE? :-)

David Trey  staff
Replied on Nov 15, 2012 - 17:09 UTC

Our API documentation features many examples on how to use it, what information is being returned and we unfortunately can't give you any more specific examples.

Best regards,

PLM CSR  premium
Replied on Nov 15, 2012 - 18:38 UTC

Epic Fail -- the most useless customer service I have ever experienced.... VERY disappointing.

Replied on May 26, 2013 - 18:36 UTC

The API docs do not make clear if parameters need to be sent using POST or GET, or if the parameters should be sent as JSON or as part of a query string, or as name=value pairs.

This is why concrete API examples would be useful.

Right now there are only partial usage snippets and vague descriptions, but no full examples (with, say, bogus placeholder tokens or password fields).

For example "/API/login" says "should be HTTPS". It then lists required parameters. Is this a POST? I would guess so. Are they to be sent as json or as name/value pairs? Doesn't say, and there is not example.

Some experimentation suggests it needs to be sent as a JSON string in the request body. But I get a 400 error response. Without an example of what is supposed to be sent, and how, it is very hard to know what is going wrong.

There is an example for "/API/getItemsById" In that case the query is done using query string.

There's another example for "/API/addItem" It also uses a query string. Is this a GET request? That seems odd for updating records, but the example does not say if this is GET or POST or what.

Amir Salihefendic  staff in training
Replied on May 27, 2013 - 12:02 UTC

Our API does not care if it's POST or GET requests, both are accepted.

E.g. to use /API/login you would do:

You would not need to send email and password as JSON.