{
    "openapi": "3.0.3",
    "info": {
        "title": "u0life REST API",
        "version": "1.0.0",
        "description": "Official First-party REST API for u0life tasks, clients, and projects. Supports personal API keys with granular resource scopes.",
        "contact": {
            "name": "u0life Documentation",
            "url": "https://u0life.com/integrations/api/"
        }
    },
    "servers": [
        {
            "url": "https://workday-smart-scheduling.u0life.com/v1",
            "description": "Current API server"
        },
        {
            "url": "https://u0life.com/v1",
            "description": "Production API"
        }
    ],
    "security": [
        {
            "BearerAuth": []
        },
        {
            "ApiKeyAuth": []
        }
    ],
    "tags": [
        {
            "name": "Tasks",
            "description": "Create, list, inspect, update status/activity, and delete tasks."
        },
        {
            "name": "Clients",
            "description": "Manage clients and contact details."
        },
        {
            "name": "Projects",
            "description": "Manage projects, work streams, and budgets."
        },
        {
            "name": "System",
            "description": "Health checks and deployment status."
        }
    ],
    "paths": {
        "/tasks": {
            "get": {
                "tags": [
                    "Tasks"
                ],
                "summary": "List tasks",
                "description": "Returns a paginated list of tasks belonging to the authenticated user. Supports filtering by status, active state, project, and client.",
                "operationId": "listTasks",
                "security": [
                    {
                        "BearerAuth": [
                            "tasks:read",
                            "tasks:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "tasks:read",
                            "tasks:*"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Number of tasks to return (default: 50, max: 100).",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 50,
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Number of tasks to skip for pagination (default: 0).",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 0,
                            "minimum": 0
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by status (0: new, 1: in progress, 2: done, 3: cancelled).",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "enum": [
                                0,
                                1,
                                2,
                                3
                            ]
                        }
                    },
                    {
                        "name": "active",
                        "in": "query",
                        "description": "Filter by active flag (1: active, 0: archived).",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "enum": [
                                0,
                                1
                            ]
                        }
                    },
                    {
                        "name": "project_id",
                        "in": "query",
                        "description": "Filter by associated project ID.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "client_id",
                        "in": "query",
                        "description": "Filter by associated client ID.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A paginated list of tasks",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskListResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized / invalid or missing API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden / insufficient scope (requires tasks:read or tasks:*)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Tasks"
                ],
                "summary": "Create task",
                "description": "Creates a new task owned by the authenticated user.",
                "operationId": "createTask",
                "security": [
                    {
                        "BearerAuth": [
                            "tasks:write",
                            "tasks:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "tasks:write",
                            "tasks:*"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TaskCreatePayload"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Task successfully created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error (e.g. missing title)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden / insufficient scope",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/tasks/{id}": {
            "parameters": [
                {
                    "name": "id",
                    "in": "path",
                    "required": true,
                    "description": "Unique ID of the task",
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "get": {
                "tags": [
                    "Tasks"
                ],
                "summary": "Get task by ID",
                "description": "Retrieves the details of a single task owned by the authenticated user.",
                "operationId": "getTask",
                "security": [
                    {
                        "BearerAuth": [
                            "tasks:read",
                            "tasks:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "tasks:read",
                            "tasks:*"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Task details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Task not found or not owned by user",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "tags": [
                    "Tasks"
                ],
                "summary": "Update task (partial)",
                "description": "Partially updates task fields. Used by frontend and automations for quick status and activity toggling. Updating status records status history and triggers gamification feedback.",
                "operationId": "patchTask",
                "security": [
                    {
                        "BearerAuth": [
                            "tasks:write",
                            "tasks:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "tasks:write",
                            "tasks:*"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TaskUpdatePayload"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Task updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskUpdateResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Task not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "Tasks"
                ],
                "summary": "Update task (full)",
                "description": "Replaces or updates task fields.",
                "operationId": "updateTask",
                "security": [
                    {
                        "BearerAuth": [
                            "tasks:write",
                            "tasks:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "tasks:write",
                            "tasks:*"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TaskUpdatePayload"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Task updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskUpdateResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Tasks"
                ],
                "summary": "Delete task",
                "description": "Permanently removes an owned task.",
                "operationId": "deleteTask",
                "security": [
                    {
                        "BearerAuth": [
                            "tasks:write",
                            "tasks:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "tasks:write",
                            "tasks:*"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Task deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeleteResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Task not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients": {
            "get": {
                "tags": [
                    "Clients"
                ],
                "summary": "List clients",
                "description": "Returns active clients owned by the authenticated user.",
                "operationId": "listClients",
                "security": [
                    {
                        "BearerAuth": [
                            "clients:read",
                            "clients:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "clients:read",
                            "clients:*"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 0
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of clients",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ClientListResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Clients"
                ],
                "summary": "Create client",
                "description": "Creates a new client record.",
                "operationId": "createClient",
                "security": [
                    {
                        "BearerAuth": [
                            "clients:write",
                            "clients:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "clients:write",
                            "clients:*"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Acme Corp"
                                    },
                                    "email": {
                                        "type": "string",
                                        "example": "contact@acme.com"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "example": "+1234567890"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Enterprise client"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Client created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ClientResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{id}": {
            "parameters": [
                {
                    "name": "id",
                    "in": "path",
                    "required": true,
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "get": {
                "tags": [
                    "Clients"
                ],
                "summary": "Get client by ID",
                "operationId": "getClient",
                "responses": {
                    "200": {
                        "description": "Client details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ClientResponse"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "tags": [
                    "Clients"
                ],
                "summary": "Update client",
                "operationId": "updateClient",
                "responses": {
                    "200": {
                        "description": "Client updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ClientResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Clients"
                ],
                "summary": "Delete client",
                "operationId": "deleteClient",
                "responses": {
                    "200": {
                        "description": "Client deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeleteResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects": {
            "get": {
                "tags": [
                    "Projects"
                ],
                "summary": "List projects",
                "description": "Returns active projects owned by the authenticated user.",
                "operationId": "listProjects",
                "security": [
                    {
                        "BearerAuth": [
                            "projects:read",
                            "projects:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "projects:read",
                            "projects:*"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of projects",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProjectListResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Projects"
                ],
                "summary": "Create project",
                "description": "Creates a new project record.",
                "operationId": "createProject",
                "security": [
                    {
                        "BearerAuth": [
                            "projects:write",
                            "projects:*"
                        ]
                    },
                    {
                        "ApiKeyAuth": [
                            "projects:write",
                            "projects:*"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Website Redesign"
                                    },
                                    "client_id": {
                                        "type": "integer",
                                        "example": 15
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Q4 marketing revamp"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Project created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProjectResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{id}": {
            "parameters": [
                {
                    "name": "id",
                    "in": "path",
                    "required": true,
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "get": {
                "tags": [
                    "Projects"
                ],
                "summary": "Get project by ID",
                "operationId": "getProject",
                "responses": {
                    "200": {
                        "description": "Project details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProjectResponse"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "tags": [
                    "Projects"
                ],
                "summary": "Update project",
                "operationId": "updateProject",
                "responses": {
                    "200": {
                        "description": "Project updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProjectResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Projects"
                ],
                "summary": "Delete project",
                "operationId": "deleteProject",
                "responses": {
                    "200": {
                        "description": "Project deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeleteResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/health": {
            "get": {
                "tags": [
                    "System"
                ],
                "summary": "Readiness probe",
                "description": "Public deployment and readiness probe. Does not require authentication.",
                "operationId": "healthCheck",
                "security": [],
                "responses": {
                    "200": {
                        "description": "API is healthy",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "example": "ok"
                                                },
                                                "service": {
                                                    "type": "string",
                                                    "example": "u0life-manager-api"
                                                },
                                                "version": {
                                                    "type": "string",
                                                    "example": "v1"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "u0_live_...",
                "description": "API key generated in u0life -> Integrations. Pass in Authorization: Bearer u0_live_..."
            },
            "ApiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key",
                "description": "API key passed in X-API-Key header."
            }
        },
        "schemas": {
            "Task": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 123
                    },
                    "title": {
                        "type": "string",
                        "example": "Client check-in call"
                    },
                    "description": {
                        "type": "string",
                        "example": "Review weekly progress and next milestones."
                    },
                    "date": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-09-18 10:00:00"
                    },
                    "priority": {
                        "type": "integer",
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "description": "1: critical, 2: this week, 3: optional, 0: none",
                        "example": 2
                    },
                    "status": {
                        "type": "integer",
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "description": "0: new, 1: in progress, 2: done, 3: cancelled",
                        "example": 0
                    },
                    "active": {
                        "type": "integer",
                        "enum": [
                            0,
                            1
                        ],
                        "description": "1: active, 0: archived",
                        "example": 1
                    },
                    "project_id": {
                        "type": "integer",
                        "example": 8
                    },
                    "client_id": {
                        "type": "integer",
                        "example": 15
                    },
                    "category_id": {
                        "type": "integer",
                        "example": 4
                    },
                    "time_planned": {
                        "type": "string",
                        "example": "01:00:00"
                    },
                    "price_planned": {
                        "type": "number",
                        "example": 150
                    }
                }
            },
            "TaskCreatePayload": {
                "type": "object",
                "required": [
                    "title"
                ],
                "properties": {
                    "title": {
                        "type": "string",
                        "description": "Task title (up to 191 characters)",
                        "example": "Prepare sales report"
                    },
                    "description": {
                        "type": "string",
                        "description": "Detailed task notes",
                        "example": "Summarize Q3 results"
                    },
                    "date": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-09-18 14:00:00"
                    },
                    "priority": {
                        "type": "integer",
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "default": 0,
                        "example": 2
                    },
                    "status": {
                        "type": "integer",
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "default": 0,
                        "example": 0
                    },
                    "active": {
                        "type": "integer",
                        "enum": [
                            0,
                            1
                        ],
                        "default": 1,
                        "example": 1
                    },
                    "project_id": {
                        "type": "integer",
                        "default": 0,
                        "example": 5
                    },
                    "client_id": {
                        "type": "integer",
                        "default": 0,
                        "example": 2
                    },
                    "category_id": {
                        "type": "integer",
                        "default": 0,
                        "example": 1
                    },
                    "time_planned": {
                        "type": "string",
                        "example": "00:45:00"
                    },
                    "price_planned": {
                        "type": "number",
                        "example": 100
                    }
                }
            },
            "TaskUpdatePayload": {
                "type": "object",
                "description": "Partial or full task update payload. Any provided field is updated.",
                "properties": {
                    "title": {
                        "type": "string",
                        "example": "Updated task title"
                    },
                    "description": {
                        "type": "string",
                        "example": "Updated description"
                    },
                    "date": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-09-18 16:00:00"
                    },
                    "priority": {
                        "type": "integer",
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "example": 1
                    },
                    "status": {
                        "type": "integer",
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "description": "Setting to 2 marks completed and triggers gamification.",
                        "example": 2
                    },
                    "active": {
                        "type": "integer",
                        "enum": [
                            0,
                            1
                        ],
                        "example": 1
                    },
                    "project_id": {
                        "type": "integer",
                        "example": 5
                    },
                    "client_id": {
                        "type": "integer",
                        "example": 2
                    },
                    "category_id": {
                        "type": "integer",
                        "example": 1
                    },
                    "time_planned": {
                        "type": "string",
                        "example": "02:00:00"
                    },
                    "price_planned": {
                        "type": "number",
                        "example": 250
                    }
                }
            },
            "TaskResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "task": {
                                "$ref": "#/components/schemas/Task"
                            }
                        }
                    }
                }
            },
            "TaskUpdateResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "task": {
                                "$ref": "#/components/schemas/Task"
                            }
                        }
                    },
                    "gamification": {
                        "$ref": "#/components/schemas/GamificationFeedback"
                    }
                }
            },
            "TaskListResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "items": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/Task"
                                }
                            },
                            "count": {
                                "type": "integer",
                                "example": 42
                            },
                            "limit": {
                                "type": "integer",
                                "example": 50
                            },
                            "offset": {
                                "type": "integer",
                                "example": 0
                            }
                        }
                    }
                }
            },
            "Client": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 15
                    },
                    "name": {
                        "type": "string",
                        "example": "Acme Corp"
                    },
                    "email": {
                        "type": "string",
                        "example": "client@acme.com"
                    },
                    "phone": {
                        "type": "string",
                        "example": "+1234567890"
                    },
                    "description": {
                        "type": "string",
                        "example": "Enterprise client"
                    },
                    "active": {
                        "type": "integer",
                        "example": 1
                    }
                }
            },
            "ClientResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "client": {
                                "$ref": "#/components/schemas/Client"
                            }
                        }
                    }
                }
            },
            "ClientListResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "items": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/Client"
                                }
                            },
                            "count": {
                                "type": "integer",
                                "example": 12
                            },
                            "limit": {
                                "type": "integer",
                                "example": 50
                            },
                            "offset": {
                                "type": "integer",
                                "example": 0
                            }
                        }
                    }
                }
            },
            "Project": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 8
                    },
                    "name": {
                        "type": "string",
                        "example": "Website Redesign"
                    },
                    "client_id": {
                        "type": "integer",
                        "example": 15
                    },
                    "description": {
                        "type": "string",
                        "example": "Q4 marketing revamp"
                    },
                    "active": {
                        "type": "integer",
                        "example": 1
                    }
                }
            },
            "ProjectResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "project": {
                                "$ref": "#/components/schemas/Project"
                            }
                        }
                    }
                }
            },
            "ProjectListResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "items": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/Project"
                                }
                            },
                            "count": {
                                "type": "integer",
                                "example": 6
                            },
                            "limit": {
                                "type": "integer",
                                "example": 50
                            },
                            "offset": {
                                "type": "integer",
                                "example": 0
                            }
                        }
                    }
                }
            },
            "GamificationFeedback": {
                "type": "object",
                "description": "Real-time gamification feedback returned upon task status completion.",
                "properties": {
                    "feedback": {
                        "type": "object",
                        "properties": {
                            "xp_earned": {
                                "type": "integer",
                                "example": 25
                            },
                            "sound": {
                                "type": "string",
                                "example": "task_done"
                            },
                            "streak": {
                                "type": "integer",
                                "example": 5
                            }
                        }
                    }
                }
            },
            "DeleteResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": true
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "deleted": {
                                "type": "boolean",
                                "example": true
                            },
                            "id": {
                                "type": "integer",
                                "example": 123
                            }
                        }
                    }
                }
            },
            "ErrorResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": false
                    },
                    "error": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string",
                                "example": "FORBIDDEN"
                            },
                            "message": {
                                "type": "string",
                                "example": "API key missing scope tasks:write"
                            }
                        }
                    }
                }
            }
        }
    }
}