How to hit the Todoist API

Todoist's unified API lives at https://api.todoist.com/api/v1. (The older REST v2 and Sync v9 APIs are retired.)

Authentication

Create a token at Settings → Integrations → Developer. Send it as Authorization: Bearer <token>. In the examples it's written {{TODOIST_TOKEN}}.

Full reference: https://developer.todoist.com/api/v1/

Active tasks

curl https://api.todoist.com/api/v1/tasks \
  -H "Authorization: Bearer {{TODOIST_TOKEN}}"
Run in PostTaco

Projects

curl https://api.todoist.com/api/v1/projects \
  -H "Authorization: Bearer {{TODOIST_TOKEN}}"
Run in PostTaco

Create a task

due_string takes natural language.

curl -X POST https://api.todoist.com/api/v1/tasks \
  -H "Authorization: Bearer {{TODOIST_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{"content": "Try PostTaco", "due_string": "tomorrow at 9am"}'
Run in PostTaco