Todoist REST API
api.todoist.com · Company
Manage Todoist tasks, projects, labels, and reminders. Read and create tasks programmatically. Free API token from your Todoist account.
Authentication
Sample Requests
Get all active tasks.
Hover any highlighted part to learn what it does
| 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));Create a new task due tomorrow.
Hover any highlighted part to learn what it does
| Content-Type | application/json |
| Authorization | Bearer YOUR_TOKEN |
{
"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 API token at app.todoist.com/app/settings/integrations/developer
- Set Authorization: Bearer YOUR_TOKEN
- GET /tasks — list all active tasks
- GET /projects — list all projects
- POST /tasks with {"content":"Task name","due_string":"today"}
What can you build with Todoist REST API?
Todoist REST API is a Company API. Developers commonly use company APIs for:
- enriching CRM records with company firmographics
- building lead-generation and prospecting tools
- verifying business identity and registration details
- monitoring competitors and market intelligence
- powering B2B data enrichment pipelines
Bearer token. Your app exchanges credentials for a short-lived token, then sends it as an Authorization header. Tokens expire, so your code needs to handle renewal. Todoist REST API is free to use up to a usage limit, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide