Back to Blog

New JSON API - Integrate Your Todo Lists with Third-Party Apps

April 09, 2025 FreeTodoList Team
New JSON API - Integrate Your Todo Lists with Third-Party Apps

New JSON API: Integrate Your Todo Lists with Third-Party Apps

We're excited to announce a new feature that many of you have been asking for: a comprehensive JSON API for FreeTodoList! This new API allows developers to programmatically access and interact with todo lists, enabling integrations with third-party applications, custom workflows, and mobile apps.

What's New

Our JSON API provides a clean, RESTful interface to access your lists and items. Simply append .json to the URL of any list to get a structured JSON representation of that list and its items. The API supports:

  • Accessing individual lists and their items
  • Viewing all of your lists in a structured format
  • Getting overdue items across all your lists
  • Full CRUD operations for list items
  • Sorting and filtering capabilities
  • Accessing shared lists

Update: We've just expanded our API with full CRUD support for list items! Read more about the new items endpoints.

How to Use the API

Access a Specific List

To get a JSON representation of any list, simply add .json to the end of its URL:

https://freetodolist.com/lists/abc123.json

This returns a structured JSON object containing the list's metadata and all its items:

{
  "list": {
    "uid": "abc123",
    "name": "Weekly Tasks",
    "description": "Things to do this week",
    "created_at": "2025-04-05T12:34:56Z",
    "updated_at": "2025-04-07T09:12:34Z",
    "url": "https://freetodolist.com/lists/abc123",
    "shareable": true,
    "shareable_url": "https://freetodolist.com/shared/def456",
    "rss_feed_url": "https://freetodolist.com/lists/abc123/feed.rss",
    "ical_feed_url": "https://freetodolist.com/lists/abc123/calendar.ics",
    "stats": {
      "total_items": 12,
      "completed_items": 5,
      "uncompleted_items": 7,
      "archived_items": 3,
      "overdue_items": 2
    }
  },
  "items": [
    {
      "body": "Complete project proposal",
      "complete": false,
      "position": 1,
      "created_at": "2025-04-05T13:14:15Z",
      "updated_at": "2025-04-05T13:14:15Z",
      "due_at": "2025-04-10T17:00:00Z",
      "completed_at": null,
      "archived": false
    },
    {
      "body": "Send weekly report",
      "complete": true,
      "position": 2,
      "created_at": "2025-04-05T13:15:30Z",
      "updated_at": "2025-04-07T09:12:34Z",
      "due_at": "2025-04-07T17:00:00Z",
      "completed_at": "2025-04-07T09:12:34Z",
      "archived": false
    }
    // Additional items...
  ]
}

Access Your Dashboard

For a comprehensive view of all your lists, access your dashboard in JSON format:

https://freetodolist.com/dashboard.json

This returns statistics about your overall lists and items, plus a summary of each list:

{
  "stats": {
    "lists_count": 5,
    "archived_lists_count": 2,
    "overdue_items_count": 3,
    "total_items": 42,
    "completed_items": 28,
    "completion_percentage": 67
  },
  "lists": [
    {
      "uid": "abc123",
      "name": "Weekly Tasks",
      "description": "Things to do this week",
      "created_at": "2025-04-05T12:34:56Z",
      "updated_at": "2025-04-07T09:12:34Z",
      "url": "https://freetodolist.com/lists/abc123",
      "position": 1,
      "shareable": true,
      "shareable_url": "https://freetodolist.com/shared/def456",
      "rss_feed_url": "https://freetodolist.com/lists/abc123/feed.rss",
      "ical_feed_url": "https://freetodolist.com/lists/abc123/calendar.ics",
      "items_count": 12,
      "completed_items_count": 5,
      "uncompleted_items_count": 7,
      "overdue_items_count": 2
    }
    // Additional lists...
  ]
}

View Overdue Items

To get a list of all overdue items across your lists:

https://freetodolist.com/overdue_items.json

This returns a structured list of all your overdue items:

{
  "count": 3,
  "items": [
    {
      "body": "Complete project proposal",
      "complete": false,
      "due_at": "2025-04-08T17:00:00Z",
      "days_overdue": 1,
      "position": 1,
      "created_at": "2025-04-05T13:14:15Z",
      "updated_at": "2025-04-05T13:14:15Z",
      "list": {
        "uid": "abc123",
        "name": "Weekly Tasks",
        "url": "https://freetodolist.com/lists/abc123",
        "rss_feed_url": "https://freetodolist.com/lists/abc123/feed.rss",
        "ical_feed_url": "https://freetodolist.com/lists/abc123/calendar.ics"
      }
    }
    // Additional overdue items...
  ]
}

Filtering and Sorting

The API supports various filtering and sorting options:

  • include_archived=true - Include archived items in the response
  • only_completed=true - Only include completed items
  • only_uncompleted=true - Only include uncompleted items
  • sort=position_desc - Sort items by position in descending order
  • sort=date_asc - Sort items by due date in ascending order

Example:

https://freetodolist.com/lists/abc123.json?sort=date_asc&only_uncompleted=true

Privacy and Security

We take your data privacy seriously. Our API implementation:

  • Does not expose internal database IDs
  • Uses unique UIDs rather than sequential IDs for lists
  • Requires authentication for accessing your private data
  • Only exposes the data that is already visible in the web interface

Integration Ideas

Here are some ways you might use the new API:

  1. Home Automation: Display your to-do list on a smart mirror or home dashboard
  2. Custom Mobile Apps: Build your own mobile app with a specialized interface for your needs
  3. Workflow Automation: Create an integration with tools like Zapier or IFTTT to automate tasks based on your to-do items
  4. Calendar Integration: Sync your to-do items with your preferred calendar application
  5. Smart Assistants: Create a skill for Alexa or Google Assistant to read your to-do list

Example Code: Task Management Script

Here's a simple Python script that demonstrates how to use our enhanced API to manage tasks:

import requests
import datetime

# API configuration
API_TOKEN = "your_api_token"
BASE_URL = "https://freetodolist.com/api/v1"
HEADERS = {
    "Authorization": f"Bearer {API_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json"
}

# Get all lists
def get_lists():
    response = requests.get(f"{BASE_URL}/lists", headers=HEADERS)
    return response.json()["lists"]

# Get items from a specific list
def get_list_items(list_uid, only_uncompleted=False):
    params = {"only_uncompleted": "true"} if only_uncompleted else {}
    response = requests.get(
        f"{BASE_URL}/lists/{list_uid}/items", 
        headers=HEADERS,
        params=params
    )
    return response.json()["items"]

# Create a new item in a list
def create_item(list_uid, body, due_at=None, position_at_top=True):
    data = {
        "item": {
            "body": body
        },
        "position_at_top": str(position_at_top).lower()
    }

    if due_at:
        data["item"]["due_at"] = due_at.isoformat()

    response = requests.post(
        f"{BASE_URL}/lists/{list_uid}/items",
        headers=HEADERS,
        json=data
    )
    return response.json()["item"]

# Mark an item as complete
def complete_item(item_uid):
    data = {
        "item": {
            "complete": True,
            "completed_at": datetime.datetime.now().isoformat()
        }
    }

    response = requests.patch(
        f"{BASE_URL}/items/{item_uid}",
        headers=HEADERS,
        json=data
    )
    return response.json()["item"]

# Example usage
if __name__ == "__main__":
    # Get the first list
    lists = get_lists()
    if not lists:
        print("No lists found")
        exit()

    work_list = lists[0]
    print(f"Working with list: {work_list['name']}")

    # Get uncompleted items
    uncompleted = get_list_items(work_list["uid"], only_uncompleted=True)
    print(f"You have {len(uncompleted)} uncompleted items")

    # Create a new task for tomorrow
    tomorrow = datetime.datetime.now() + datetime.timedelta(days=1)
    new_item = create_item(
        work_list["uid"],
        "Review API documentation",
        due_at=tomorrow
    )
    print(f"Created new item: {new_item['body']}")

    # Mark the first uncompleted item as complete (if any exist)
    if uncompleted:
        completed = complete_item(uncompleted[0]["uid"])
        print(f"Marked as complete: {completed['body']}")

API Documentation

For full documentation of all available endpoints, parameters, and response formats, visit our API Documentation page.

Feedback

We'd love to hear how you're using the API and what additional features would make it more useful for you. Please send us feedback with your ideas and suggestions.


Have you tried our new JSON API yet? Let us know what you're building with it!

Home New List Templates Login