4todo Documentation

⚠️ API Status: Unstable - This API is currently in development and may change at any time without notice. Breaking changes may occur in future versions.

Welcome to the 4todo API documentation. This API allows you to programmatically manage your todos and recurring tasks using the Eisenhower Matrix methodology.

Authentication

All API requests require authentication using a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_TOKEN

Note: You can generate API tokens from your account settings.

Base URL

https://4to.do/api/v0

Quadrant System

The Eisenhower Matrix divides tasks into four quadrants:

CodeDescriptionMeaning
IUImportant & UrgentDo first - Critical tasks requiring immediate attention
INImportant & Not UrgentSchedule - Important tasks for long-term success
NUNot Important & UrgentDelegate - Tasks that need to be done but not by you
NNNot Important & Not UrgentEliminate - Low-value tasks to minimize

Endpoints

Todos

Create Todo

Create a new todo item in a specific quadrant.

POST /api/v1/todos

Request Body:

FieldTypeRequiredDescription
namestringYesTodo item name (1-500 characters)
quadrantstringYesQuadrant type: IU, IN, NU, or NN

Example Request:

{
  "name": "Complete project proposal",
  "quadrant": "IU"
}

Example Response:

{
  "message": "Todo created successfully"
}

Complete Todo

Mark a todo item as completed.

POST /api/v1/todos/:id/complete

URL Parameters:

ParameterDescription
idTodo ID (TypeID format: todo_...)

Example Response:

{
  "message": "Todo completed successfully"
}

Note: This endpoint is idempotent - completing an already completed todo will return success without error.

Reorder Todos

Reorder todos within the same quadrant or move them between quadrants.

POST /api/v1/todos/reorder

Request Body:

FieldTypeRequiredDescription
moved_todo_idstringYesID of the todo being moved
previous_todo_idstringNoID of the todo before the new position (null if moving to first position)
next_todo_idstringNoID of the todo after the new position (null if moving to last position)
quadrantstringYesTarget quadrant: IU, IN, NU, or NN

Example Request:

{
  "moved_todo_id": "todo_01hqk8z9w3r2n1p0m4v5x7y6",
  "previous_todo_id": "todo_01hqk8z8x2q1m0n3k4u5w6x7",
  "next_todo_id": null,
  "quadrant": "IN"
}

Example Response:

{
  "message": "Todo reordered successfully"
}

Recurring Todos

Recurring todos automatically create new instances based on a schedule.

Create Recurring Todo

Create a new recurring todo with a specified frequency.

POST /api/v1/recurring-todos

Request Body:

FieldTypeRequiredDescription
titlestringYesRecurring todo title
quadrantstringYesQuadrant type: IU, IN, NU, or NN
frequencystringYesdaily, weekly, or monthly
weekdaysarrayConditionalRequired for weekly frequency. Array of weekday codes: ["MO", "TU", "WE", "TH", "FR", "SA", "SU"]
month_dayintegerConditionalRequired for monthly frequency. Day of month (1-31)
timezonestringYesIANA timezone identifier (e.g., "America/New_York", "Europe/London")

Example Request (Daily):

{
  "title": "Morning standup",
  "quadrant": "IU",
  "frequency": "daily",
  "timezone": "America/Los_Angeles"
}

Example Request (Weekly):

{
  "title": "Team meeting",
  "quadrant": "IN",
  "frequency": "weekly",
  "weekdays": ["MO", "WE", "FR"],
  "timezone": "America/New_York"
}

Example Request (Monthly):

{
  "title": "Monthly report",
  "quadrant": "IN",
  "frequency": "monthly",
  "month_day": 1,
  "timezone": "UTC"
}

Example Response:

{
  "message": "Recurring todo created successfully"
}

Get Recurring Todo

Retrieve details of a specific recurring todo.

GET /api/v1/recurring-todos/:id

URL Parameters:

ParameterDescription
idRecurring todo ID

Example Response:

{
  "id": "rtodo_01hqk8z9w3r2n1p0m4v5x7y6",
  "title": "Morning standup",
  "quadrant": "IU",
  "frequency": "daily",
  "timezone": "America/Los_Angeles",
  "created_at": "2025-01-15T10:30:00Z"
}

Update Recurring Todo

Update an existing recurring todo's properties.

PUT /api/v1/recurring-todos/:id

Request Body: Same fields as create, all optional

Example Response:

{
  "message": "Recurring todo updated successfully"
}

Delete Recurring Todo

Delete a recurring todo. This will stop future instances from being created.

DELETE /api/v1/recurring-todos/:id

Example Response:

{
  "message": "Recurring todo deleted successfully"
}

Error Responses

The API uses standard HTTP status codes to indicate success or failure.

Status Codes

CodeDescription
200Success - Request completed successfully
400Bad Request - Invalid request data or parameters
401Unauthorized - Missing or invalid authentication token
404Not Found - Requested resource does not exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong on our end

Error Response Format

All error responses follow this structure:

{
  "error": "Detailed error description"
}

Example Error:

{
  "error": "Invalid quadrant type. Must be one of: IU, IN, NU, NN"
}

Best Practices

TypeID Format

All IDs in the API use TypeID format for time-sortable, globally unique identifiers:

Timezones

Always use valid IANA timezone identifiers. Common examples:

Pagination

Currently, API responses are not paginated. This may change in future versions.

Support

For API support or to report issues:


Last updated: 2025-10-12