Find an API

Search public APIs with auth details & Postman guides

← All APIs

Todoist REST API

api.todoist.com · Company

Company Bearer Token Free Tier Productivity Tasks To-do

Manage Todoist tasks, projects, labels, and reminders. Read and create tasks programmatically. Free API token from your Todoist account.

Authentication

Bearer Token Free API token at app.todoist.com/app/settings/integrations/developer. Pass as Authorization: Bearer YOUR_TOKEN.

Sample Requests

GET Get all tasks

Get all active tasks.

https://api.todoist.com/rest/v2/tasks

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
Authorization Bearer YOUR_TOKEN
curl -X GET "https://api.todoist.com/rest/v2/tasks" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
response = requests.get(
    "https://api.todoist.com/rest/v2/tasks",
    headers=headers,
)
print(response.json())
const url = 'https://api.todoist.com/rest/v2/tasks';

const response = await fetch(url, {
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
  },
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	targetURL := "https://api.todoist.com/rest/v2/tasks"
	req, _ := http.NewRequest("GET", targetURL, nil)
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.todoist.com/rest/v2/tasks")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_ACCESS_TOKEN"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.todoist.com/rest/v2/tasks";
$opts = ["http" => [
    "method" => "GET",
    "header" => implode("\r\n", [
        "Authorization: Bearer YOUR_ACCESS_TOKEN"
    ]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
POST Create a task

Create a new task due tomorrow.

https://api.todoist.com/rest/v2/tasks

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
Content-Type application/json
Authorization Bearer YOUR_TOKEN
Request Body — data you're sending
{
  "content": "Buy groceries",
  "due_string": "tomorrow"
}
curl -X POST "https://api.todoist.com/rest/v2/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"Buy groceries","due_string":"tomorrow"}'
import requests
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
data = {
    "content": "Buy groceries",
    "due_string": "tomorrow"
}
response = requests.post(
    "https://api.todoist.com/rest/v2/tasks",
    headers=headers,
    json=data,
)
print(response.json())
const url = 'https://api.todoist.com/rest/v2/tasks';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
  },
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
  "content": "Buy groceries",
  "due_string": "tomorrow"
}),
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"bytes"
	"encoding/json"
)

func main() {
	targetURL := "https://api.todoist.com/rest/v2/tasks"
	jsonData, _ := json.Marshal({"content":"Buy groceries","due_string":"tomorrow"})
	req, _ := http.NewRequest("POST", targetURL, bytes.NewBuffer(jsonData))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.todoist.com/rest/v2/tasks")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)
req["Content-Type"] = "application/json"
req["Authorization"] = "Bearer YOUR_ACCESS_TOKEN"
req["Content-Type"] = "application/json"
req.body = "{\"content\":\"Buy groceries\",\"due_string\":\"tomorrow\"}"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.todoist.com/rest/v2/tasks";
$opts = ["http" => [
    "method" => "POST",
    "header" => implode("\r\n", [
        "Content-Type: application/json",
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Content-Type: application/json"
    ]),
    "content" => json_encode({"content":"Buy groceries","due_string":"tomorrow"}),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. Get API token at app.todoist.com/app/settings/integrations/developer
  2. Set Authorization: Bearer YOUR_TOKEN
  3. GET /tasks — list all active tasks
  4. GET /projects — list all projects
  5. POST /tasks with {"content":"Task name","due_string":"today"}

Open documentation ↗