Back to Blog

Enhanced JSON API - Now with Full Items CRUD Support

April 09, 2025 FreeTodoList Team
Enhanced JSON API - Now with Full Items CRUD Support

Enhanced JSON API: Now with Full Items CRUD Support

We're excited to announce a significant enhancement to our JSON API: full CRUD (Create, Read, Update, Delete) support for list items! This update gives developers even more flexibility when integrating FreeTodoList with other applications.

What's New

Our API now allows you to:

  • Retrieve all items from a specific list with advanced filtering options
  • Create new items in a list
  • Fetch details about a specific item
  • Update existing items
  • Delete items

All endpoints follow RESTful principles and are accessible through our API namespace at /api/v1.

New Endpoints

Get All Items in a List

GET /api/v1/lists/:list_id/items

This endpoint returns all items from a specific list, with support for advanced filtering:

{
  "items": [
    {
      "uid": "01234567-89ab-cdef-0123-456789abcdef",
      "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,
      "list_uid": "abc123"
    },
    // Additional items...
  ]
}

Create a New Item

POST /api/v1/lists/:list_id/items

This endpoint allows you to create a new item in a specified list:

// Request body
{
  "item": {
    "body": "New item added via API",
    "due_at": "2025-04-15T09:00:00Z"
  }
}

// Response
{
  "item": {
    "uid": "fedcba98-7654-3210-fedc-ba9876543210",
    "body": "New item added via API",
    "complete": false,
    "position": 1,
    "created_at": "2025-04-09T14:22:15Z",
    "updated_at": "2025-04-09T14:22:15Z",
    "due_at": "2025-04-15T09:00:00Z",
    "completed_at": null,
    "archived": false,
    "list_uid": "abc123"
  },
  "message": "Item successfully created"
}

Get Item Details

GET /api/v1/items/:uid

Retrieve detailed information about a specific item:

{
  "item": {
    "uid": "01234567-89ab-cdef-0123-456789abcdef",
    "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,
    "list_uid": "abc123"
  }
}

Update an Item

PATCH /api/v1/items/:uid

This endpoint allows you to update an existing item:

// Request body
{
  "item": {
    "body": "Updated item via API",
    "complete": true
  }
}

// Response
{
  "item": {
    "uid": "01234567-89ab-cdef-0123-456789abcdef",
    "body": "Updated item via API",
    "complete": true,
    "position": 1,
    "created_at": "2025-04-05T13:14:15Z",
    "updated_at": "2025-04-09T14:25:10Z",
    "due_at": "2025-04-10T17:00:00Z",
    "completed_at": "2025-04-09T14:25:10Z",
    "archived": false,
    "list_uid": "abc123"
  },
  "message": "Item successfully updated"
}

Delete an Item

DELETE /api/v1/items/:uid

Permanently remove an item:

{
  "message": "Item successfully deleted"
}

Advanced Filtering

Our item endpoints support sophisticated filtering options:

  • Filter by completion status: only_completed=true or only_uncompleted=true
  • Include or exclude archived items: include_archived=true
  • Filter by due date: due_before=2025-04-15 or due_after=2025-04-01
  • Sort in various ways: sort=position_desc, sort=date_asc, sort=created_desc, etc.

Example: Task Automation Workflow

With these new endpoints, you can now build more sophisticated integrations. For example, here's a simple workflow automation:

  1. Every morning, retrieve all your uncompleted tasks due today using the items endpoint with filtering
  2. Mark high-priority items as complete via the update endpoint when you finish them on the go
  3. At the end of the day, add items to tomorrow's list using the create endpoint

API Documentation

For complete details on all API endpoints, parameters, and response formats, check out our updated API Documentation.

Feedback

We're committed to making our API as useful as possible. If you have suggestions or feature requests for future API enhancements, please send us feedback.


What are you building with our enhanced API? Share your projects and ideas in the comments below!

Home New List Templates Login