# Casa Board API

This open household app is not an authentication system. Use X-Actor only to record whether Mario or Nuria made a change; it does not prove identity.

All task responses are JSON. Write requests use Content-Type: application/json and X-Actor: Mario or X-Actor: Nuria. Browser writes must be same-origin. Requests without Origin are accepted for scripts and agents.

## Endpoints

- GET /api/tasks — return all tasks, newest first.
- POST /api/tasks — create a task. JSON: {"title":"...","notes":"...","assignee":null,"status":"todo"}. Title is required (1–120 characters); notes are optional (up to 2,000); assignee is null, Mario, or Nuria; status is todo, doing, or done.
- PATCH /api/tasks/{id} — update any supplied task fields using the same validation rules.
- DELETE /api/tasks/{id} — permanently delete a task.
- GET /api/health — liveness and task count.
- GET /api/docs — this document.

Successful create returns 201 and the task. Update returns 200. Delete returns 204. Errors have {"error":{"code":"...","message":"..."}}.

Task records include id, title, notes, assignee, status, created_at, updated_at, created_by, and updated_by. Status values are todo (Por hacer), doing (En curso), and done (Hecho).
