API de tareas
Tasks REST API
The Tasks REST API provides full CRUD capabilities (create, list, inspect, partial update, and delete) under /v1/tasks. Authenticated with a user API key (Bearer or X-API-Key), it enforces record ownership and resource scopes (tasks:read, tasks:write, or wildcard tasks:*).
Create task
POST
/v1/tasks
Creates one task for the API key owner.
curl -X POST https://u0life.com/v1/tasks \
-H "Authorization: Bearer u0_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Call client",
"description": "Created from external API",
"date": "2026-09-18 10:00:00",
"status": 0,
"priority": 2,
"client_id": 15,
"project_id": 8,
"category_id": 4,
"time_planned": "01:30:00",
"price_planned": 120
}'
List and filter tasks
GET
/v1/tasks
Returns paginated tasks. Supports filtering by status, active state, project_id, and client_id.
curl -X GET "https://u0life.com/v1/tasks?limit=50&offset=0&status=0&active=1" \
-H "Authorization: Bearer u0_live_your_key"
Get task by ID
GET
/v1/tasks/{id}
Returns details for a single task owned by the user.
curl -X GET https://u0life.com/v1/tasks/123 \
-H "Authorization: Bearer u0_live_your_key"
Update task status and fields
PATCH
/v1/tasks/{id}
Partially updates task fields. Setting status to 2 completes the task and triggers real-time gamification feedback.
curl -X PATCH https://u0life.com/v1/tasks/123 \
-H "Authorization: Bearer u0_live_your_key" \
-H "Content-Type: application/json" \
-d '{"status": 2}'
Delete task
DELETE
/v1/tasks/{id}
Permanently deletes an owned task.
curl -X DELETE https://u0life.com/v1/tasks/123 \
-H "Authorization: Bearer u0_live_your_key"
Fields
title
required
Task title, up to 191 characters.
description
optional
Long text shown in the task.
date
optional
Planned date/time in server format, for example 2026-06-16 10:00:00.
status
optional
Integer status from 0 to 3.
priority
optional
Integer priority from 0 to 3: 1 is critical and cannot move, 2 is this week, 3 is useful but not critical, 0 is no priority.
client_id
optional
Existing client owned by the API key user.
project_id
optional
Existing project owned by the API key user.
category_id
optional
Existing category owned by the API key user.
time_planned
optional
Planned time in HH:MM:SS format.
price_planned
optional
Planned monetary value as a number.