Base URL
All API requests should be made to:Content Type
All requests and responses use JSON format. Include the following header in your requests:Authentication
The current version of the API does not require authentication. All endpoints are publicly accessible.API Endpoints
The API is organized around two main resources:- Tasks (
/api/tasks) - Manage individual tasks with titles, descriptions, completion status, and categories - Task Categories (
/api/taskCategories) - Organize tasks into categories
Business Rules
Unique Identifiers (UUID)
All entities use UUID v4 generated via Node.jscrypto module for unique identification. IDs are automatically generated by the API and should not be provided in create requests.
Example UUID:
550e8400-e29b-41d4-a716-446655440000Date Format
All timestamps follow the ISO 8601 standard:2026-03-11T14:30:00.000Z
Input Validation
The API uses Zod for schema validation:- Invalid fields are ignored
- String values are automatically trimmed (whitespace removed from start and end)
- Type mismatches return 400 Bad Request errors
Task Lifecycle Management
Timestamps
- createdAt: Automatically set when a task is created (read-only)
- updatedAt: Automatically updated on every modification (read-only)
- finishedAt: Automatically managed based on completion status (read-only)
- Set to current timestamp when
completedchanges fromfalsetotrue - Removed when
completedchanges fromtruetofalse
- Set to current timestamp when
Default Categorization
If nocategoryId is specified when creating or updating a task, the system automatically assigns the label "uncategorized".
Category Management
Referential Integrity
When categories are deleted, the API automatically maintains data integrity:- All tasks linked to deleted categories are reassigned to
"uncategorized" - The deletion operation completes successfully
- No tasks are lost in the process
The special
"uncategorized" value is a string literal, not a UUID. It serves as the default category for tasks without an explicit category assignment.Unique Category Names
Category names must be unique and valid according to the schema validation rules.Error Handling
The API uses standard HTTP status codes to indicate the success or failure of requests:Success Codes
- 200 OK - Request succeeded, response body contains data
- 201 Created - Resource successfully created, response body contains the new resource
- 204 No Content - Request succeeded, no response body (typically for DELETE operations)
Error Codes
- 400 Bad Request - Invalid request data or validation failure
- 404 Not Found - Requested resource does not exist
- 500 Internal Server Error - Server-side error occurred
Error Response Format
Error responses include a descriptive message:Rate Limiting
The current version does not implement rate limiting.API Versioning
The current API does not use versioning. All endpoints are accessed directly under/api.
Quick Start Example
Here’s a complete example of creating a task and assigning it to a category:Next Steps
Data Models
Explore the complete Task and TaskCategory schemas
Tasks API
Learn how to manage tasks
Categories API
Learn how to organize tasks with categories