{ "openapi": "3.1.0", "info": { "title": "Will Be Done API", "description": "Public HTTP API for Will Be Done.", "version": "1.0.0" }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "Token returned by the login or register endpoint." } }, "schemas": {} }, "paths": { "/api/v1/spaces": { "get": { "operationId": "listSpaces", "summary": "List spaces", "tags": ["Spaces"], "description": "Returns the spaces belonging to the authenticated user.", "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Spaces belonging to the authenticated user", "content": { "application/json": { "schema": { "type": "object", "properties": { "spaces": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Space identifier" }, "name": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "Creation time in ISO 8601 format" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "Update time in ISO 8601 format" } }, "required": ["id", "name", "createdAt", "updatedAt"], "additionalProperties": false } } }, "required": ["spaces"], "additionalProperties": false, "description": "Spaces belonging to the authenticated user" } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "post": { "operationId": "createSpace", "summary": "Create a space", "tags": ["Spaces"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "description": "Space name" } }, "required": ["name"] } } } }, "security": [{ "bearerAuth": [] }], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "space": { "type": "object", "properties": { "id": { "type": "string", "description": "Space identifier" }, "name": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "Creation time in ISO 8601 format" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "Update time in ISO 8601 format" } }, "required": ["id", "name", "createdAt", "updatedAt"], "additionalProperties": false } }, "required": ["space"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}": { "delete": { "operationId": "deleteSpace", "summary": "Delete a space", "tags": ["Spaces"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "204": { "description": "Default Response" }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "patch": { "operationId": "updateSpace", "summary": "Update a space", "tags": ["Spaces"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 } }, "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "space": { "type": "object", "properties": { "id": { "type": "string", "description": "Space identifier" }, "name": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "Creation time in ISO 8601 format" }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "Update time in ISO 8601 format" } }, "required": ["id", "name", "createdAt", "updatedAt"], "additionalProperties": false } }, "required": ["space"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/projects": { "get": { "operationId": "listProjects", "summary": "List projects", "tags": ["Projects"], "description": "Returns the projects in a space in their display order.", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Projects in display order", "content": { "application/json": { "schema": { "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Project identifier" }, "title": { "type": "string" }, "icon": { "type": "string" }, "isInbox": { "type": "boolean" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "orderToken": { "type": "string" } }, "required": [ "id", "title", "icon", "isInbox", "createdAt", "orderToken" ], "additionalProperties": false } } }, "required": ["projects"], "additionalProperties": false, "description": "Projects in display order" } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "post": { "operationId": "createProject", "summary": "Create a project", "tags": ["Projects"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "icon": { "type": "string" }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["title"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "project": { "type": "object", "properties": { "id": { "type": "string", "description": "Project identifier" }, "title": { "type": "string" }, "icon": { "type": "string" }, "isInbox": { "type": "boolean" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "orderToken": { "type": "string" } }, "required": [ "id", "title", "icon", "isInbox", "createdAt", "orderToken" ], "additionalProperties": false } }, "required": ["project"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/projects/{projectId}": { "patch": { "operationId": "updateProject", "summary": "Update or reposition a project", "tags": ["Projects"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "icon": { "type": "string" } }, "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "projectId", "required": true, "description": "Project identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "project": { "type": "object", "properties": { "id": { "type": "string", "description": "Project identifier" }, "title": { "type": "string" }, "icon": { "type": "string" }, "isInbox": { "type": "boolean" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "orderToken": { "type": "string" } }, "required": [ "id", "title", "icon", "isInbox", "createdAt", "orderToken" ], "additionalProperties": false } }, "required": ["project"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "delete": { "operationId": "deleteProject", "summary": "Delete a project", "tags": ["Projects"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "projectId", "required": true, "description": "Project identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "204": { "description": "Default Response" }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/projects/{projectId}/move": { "post": { "operationId": "moveProject", "summary": "Move a project", "tags": ["Projects"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["placement"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "projectId", "required": true, "description": "Project identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "project": { "type": "object", "properties": { "id": { "type": "string", "description": "Project identifier" }, "title": { "type": "string" }, "icon": { "type": "string" }, "isInbox": { "type": "boolean" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "orderToken": { "type": "string" } }, "required": [ "id", "title", "icon", "isInbox", "createdAt", "orderToken" ], "additionalProperties": false } }, "required": ["project"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/projects/{projectId}/sections": { "get": { "operationId": "listProjectSections", "summary": "List project sections", "tags": ["Project sections"], "description": "Returns a project's sections in display order.", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "projectId", "required": true, "description": "Project identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "sections": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Project section identifier" }, "projectId": { "type": "string", "description": "Parent project identifier" }, "title": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" } }, "required": ["id", "projectId", "title", "createdAt"], "additionalProperties": false } } }, "required": ["sections"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "post": { "operationId": "createProjectSection", "summary": "Create a project section", "tags": ["Project sections"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["title"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "projectId", "required": true, "description": "Project identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "section": { "type": "object", "properties": { "id": { "type": "string", "description": "Project section identifier" }, "projectId": { "type": "string", "description": "Parent project identifier" }, "title": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" } }, "required": ["id", "projectId", "title", "createdAt"], "additionalProperties": false } }, "required": ["section"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/sections/{sectionId}": { "patch": { "operationId": "updateProjectSection", "summary": "Update, move, or reposition a project section", "tags": ["Project sections"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 } }, "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "sectionId", "required": true, "description": "Project section identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "section": { "type": "object", "properties": { "id": { "type": "string", "description": "Project section identifier" }, "projectId": { "type": "string", "description": "Parent project identifier" }, "title": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" } }, "required": ["id", "projectId", "title", "createdAt"], "additionalProperties": false } }, "required": ["section"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "delete": { "operationId": "deleteProjectSection", "summary": "Delete a project section", "tags": ["Project sections"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "sectionId", "required": true, "description": "Project section identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "204": { "description": "Default Response" }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/sections/{sectionId}/move": { "post": { "operationId": "moveProjectSection", "summary": "Move a project section", "tags": ["Project sections"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "projectId": { "type": "string", "minLength": 1 }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["projectId", "placement"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "sectionId", "required": true, "description": "Project section identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "section": { "type": "object", "properties": { "id": { "type": "string", "description": "Project section identifier" }, "projectId": { "type": "string", "description": "Parent project identifier" }, "title": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" } }, "required": ["id", "projectId", "title", "createdAt"], "additionalProperties": false } }, "required": ["section"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/sections/{sectionId}/items": { "get": { "operationId": "listSectionItems", "summary": "List section items", "tags": ["Items"], "description": "Returns todo tasks and templates in display order by default. When taskState is done, returns completed tasks only.", "parameters": [ { "schema": { "default": "todo", "type": "string", "enum": ["todo", "done"] }, "in": "query", "name": "taskState", "required": false }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "sectionId", "required": true, "description": "Project section identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["task"] }, "id": { "type": "string", "description": "Task identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "lastToggledAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Last state change time as Unix milliseconds" }, "scheduledDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ], "description": "Current schedule date, or null when the task is unscheduled" } }, "required": [ "type", "id", "title", "state", "projectSectionId", "nature", "createdAt", "lastToggledAt", "scheduledDate" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["template"] }, "id": { "type": "string", "description": "Task template identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "repeatRule": { "type": "string" }, "repeatRuleDtStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "lastGeneratedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "type", "id", "title", "projectSectionId", "nature", "repeatRule", "repeatRuleDtStart", "createdAt", "lastGeneratedAt" ], "additionalProperties": false } ] } } }, "required": ["items"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/sections/{sectionId}/tasks": { "post": { "operationId": "createSectionTask", "summary": "Create a task", "tags": ["Tasks"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "content": { "type": "string" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["title"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "sectionId", "required": true, "description": "Project section identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "task": { "type": "object", "properties": { "type": { "type": "string", "enum": ["task"] }, "id": { "type": "string", "description": "Task identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "lastToggledAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Last state change time as Unix milliseconds" }, "scheduledDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ], "description": "Current schedule date, or null when the task is unscheduled" } }, "required": [ "type", "id", "title", "state", "projectSectionId", "nature", "createdAt", "lastToggledAt", "scheduledDate" ], "additionalProperties": false } }, "required": ["task"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/tasks/{taskId}": { "get": { "operationId": "getTask", "summary": "Get a task", "tags": ["Tasks"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "taskId", "required": true, "description": "Task identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "task": { "type": "object", "properties": { "type": { "type": "string", "enum": ["task"] }, "id": { "type": "string", "description": "Task identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "lastToggledAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Last state change time as Unix milliseconds" }, "scheduledDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ], "description": "Current schedule date, or null when the task is unscheduled" } }, "required": [ "type", "id", "title", "state", "projectSectionId", "nature", "createdAt", "lastToggledAt", "scheduledDate" ], "additionalProperties": false } }, "required": ["task"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "patch": { "operationId": "updateTask", "summary": "Update or move a task", "tags": ["Tasks"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "content": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "state": { "type": "string", "enum": ["todo", "done"] }, "nature": { "anyOf": [ { "type": "string", "enum": ["red", "green", "unknown"] }, { "type": "null" } ] } }, "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "taskId", "required": true, "description": "Task identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "task": { "type": "object", "properties": { "type": { "type": "string", "enum": ["task"] }, "id": { "type": "string", "description": "Task identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "lastToggledAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Last state change time as Unix milliseconds" }, "scheduledDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ], "description": "Current schedule date, or null when the task is unscheduled" } }, "required": [ "type", "id", "title", "state", "projectSectionId", "nature", "createdAt", "lastToggledAt", "scheduledDate" ], "additionalProperties": false } }, "required": ["task"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "delete": { "operationId": "deleteTask", "summary": "Delete a task", "tags": ["Tasks"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "taskId", "required": true, "description": "Task identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "204": { "description": "Default Response" }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/tasks/{taskId}/schedule": { "delete": { "operationId": "clearTaskSchedule", "summary": "Clear a task schedule", "tags": ["Tasks"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "taskId", "required": true, "description": "Task identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "204": { "description": "Default Response" }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "post": { "operationId": "scheduleTask", "summary": "Schedule a task", "tags": ["Tasks"], "description": "Schedules or reschedules a task on a date. Existing schedules are replaced.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "date": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$", "description": "Schedule date in YYYY-MM-DD format" }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["date"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "taskId", "required": true, "description": "Task identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "task": { "type": "object", "properties": { "type": { "type": "string", "enum": ["task"] }, "id": { "type": "string", "description": "Task identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "lastToggledAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Last state change time as Unix milliseconds" }, "scheduledDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ], "description": "Current schedule date, or null when the task is unscheduled" } }, "required": [ "type", "id", "title", "state", "projectSectionId", "nature", "createdAt", "lastToggledAt", "scheduledDate" ], "additionalProperties": false }, "date": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" } }, "required": ["task", "date"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/tasks/{taskId}/move": { "post": { "operationId": "moveTask", "summary": "Move a task", "tags": ["Tasks"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "projectSectionId": { "type": "string", "minLength": 1 }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["projectSectionId", "placement"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "taskId", "required": true, "description": "Task identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "task": { "type": "object", "properties": { "type": { "type": "string", "enum": ["task"] }, "id": { "type": "string", "description": "Task identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "lastToggledAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Last state change time as Unix milliseconds" }, "scheduledDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ], "description": "Current schedule date, or null when the task is unscheduled" } }, "required": [ "type", "id", "title", "state", "projectSectionId", "nature", "createdAt", "lastToggledAt", "scheduledDate" ], "additionalProperties": false } }, "required": ["task"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/daily-lists/{date}/items": { "get": { "operationId": "listDailyListItems", "summary": "List daily-list items", "tags": ["Daily lists"], "description": "Returns scheduled todo tasks in daily-list order by default, or completed tasks ordered by most recently completed.", "parameters": [ { "schema": { "default": "todo", "type": "string", "enum": ["todo", "done"] }, "in": "query", "name": "state", "required": false }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, "in": "path", "name": "date", "required": true, "description": "Daily-list date in YYYY-MM-DD format" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["task"] }, "id": { "type": "string", "description": "Task identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "lastToggledAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Last state change time as Unix milliseconds" }, "scheduledDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ], "description": "Current schedule date, or null when the task is unscheduled" } }, "required": [ "type", "id", "title", "state", "projectSectionId", "nature", "createdAt", "lastToggledAt", "scheduledDate" ], "additionalProperties": false } } }, "required": ["items"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/sections/{sectionId}/task-templates": { "post": { "operationId": "createTaskTemplate", "summary": "Create a task template", "tags": ["Task templates"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "content": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "nature": { "anyOf": [ { "type": "string", "enum": ["red", "green", "unknown"] }, { "type": "null" } ] }, "repeatRule": { "type": "string", "minLength": 1 }, "repeatRuleDtStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["title"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "sectionId", "required": true, "description": "Project section identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "type": "object", "properties": { "type": { "type": "string", "enum": ["template"] }, "id": { "type": "string", "description": "Task template identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "repeatRule": { "type": "string" }, "repeatRuleDtStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "lastGeneratedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "type", "id", "title", "projectSectionId", "nature", "repeatRule", "repeatRuleDtStart", "createdAt", "lastGeneratedAt" ], "additionalProperties": false } }, "required": ["template"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/task-templates/{templateId}": { "get": { "operationId": "getTaskTemplate", "summary": "Get a task template", "tags": ["Task templates"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "templateId", "required": true, "description": "Task template identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "type": "object", "properties": { "type": { "type": "string", "enum": ["template"] }, "id": { "type": "string", "description": "Task template identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "repeatRule": { "type": "string" }, "repeatRuleDtStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "lastGeneratedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "type", "id", "title", "projectSectionId", "nature", "repeatRule", "repeatRuleDtStart", "createdAt", "lastGeneratedAt" ], "additionalProperties": false } }, "required": ["template"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "patch": { "operationId": "updateTaskTemplate", "summary": "Update a task template", "tags": ["Task templates"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "content": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "nature": { "anyOf": [ { "type": "string", "enum": ["red", "green", "unknown"] }, { "type": "null" } ] }, "repeatRule": { "type": "string", "minLength": 1 }, "repeatRuleDtStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "templateId", "required": true, "description": "Task template identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "type": "object", "properties": { "type": { "type": "string", "enum": ["template"] }, "id": { "type": "string", "description": "Task template identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "repeatRule": { "type": "string" }, "repeatRuleDtStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "lastGeneratedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "type", "id", "title", "projectSectionId", "nature", "repeatRule", "repeatRuleDtStart", "createdAt", "lastGeneratedAt" ], "additionalProperties": false } }, "required": ["template"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "delete": { "operationId": "deleteTaskTemplate", "summary": "Delete a task template", "tags": ["Task templates"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "templateId", "required": true, "description": "Task template identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "204": { "description": "Default Response" }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/task-templates/{templateId}/move": { "post": { "operationId": "moveTaskTemplate", "summary": "Move a task template", "tags": ["Task templates"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "projectSectionId": { "type": "string", "minLength": 1 }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["projectSectionId", "placement"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "templateId", "required": true, "description": "Task template identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "type": "object", "properties": { "type": { "type": "string", "enum": ["template"] }, "id": { "type": "string", "description": "Task template identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "repeatRule": { "type": "string" }, "repeatRuleDtStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "lastGeneratedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "type", "id", "title", "projectSectionId", "nature", "repeatRule", "repeatRuleDtStart", "createdAt", "lastGeneratedAt" ], "additionalProperties": false } }, "required": ["template"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/tasks/{taskId}/convert-to-template": { "post": { "operationId": "convertTaskToTemplate", "summary": "Convert a task to a recurring template", "tags": ["Task templates"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "content": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "nature": { "anyOf": [ { "type": "string", "enum": ["red", "green", "unknown"] }, { "type": "null" } ] }, "repeatRule": { "type": "string", "minLength": 1 }, "repeatRuleDtStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "taskId", "required": true, "description": "Task identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "type": "object", "properties": { "type": { "type": "string", "enum": ["template"] }, "id": { "type": "string", "description": "Task template identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "repeatRule": { "type": "string" }, "repeatRuleDtStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "lastGeneratedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "type", "id", "title", "projectSectionId", "nature", "repeatRule", "repeatRuleDtStart", "createdAt", "lastGeneratedAt" ], "additionalProperties": false } }, "required": ["template"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/task-templates/{templateId}/convert-to-task": { "post": { "operationId": "convertTaskTemplateToTask", "summary": "Convert a task template to a task", "tags": ["Task templates"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "templateId", "required": true, "description": "Task template identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "task": { "type": "object", "properties": { "type": { "type": "string", "enum": ["task"] }, "id": { "type": "string", "description": "Task identifier" }, "title": { "type": "string" }, "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "projectSectionId": { "type": "string", "description": "Parent project section identifier" }, "nature": { "type": "string", "enum": ["red", "green", "unknown"] }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Creation time as Unix milliseconds" }, "lastToggledAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Last state change time as Unix milliseconds" }, "scheduledDate": { "anyOf": [ { "type": "string", "format": "date", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$" }, { "type": "null" } ], "description": "Current schedule date, or null when the task is unscheduled" } }, "required": [ "type", "id", "title", "state", "projectSectionId", "nature", "createdAt", "lastToggledAt", "scheduledDate" ], "additionalProperties": false } }, "required": ["task"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/tasks/{taskId}/checklist-items": { "get": { "operationId": "listTaskChecklistItems", "summary": "List a task's checklist items", "tags": ["Checklist items"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "taskId", "required": true, "description": "Task identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "checklistItems": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["checklistItem"] }, "id": { "type": "string", "description": "Checklist item identifier" }, "parentId": { "type": "string", "description": "Task or task-template identifier" }, "parentType": { "type": "string", "enum": ["task", "template"] }, "state": { "type": "string", "enum": ["todo", "done"] }, "content": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "checkedAt": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "type", "id", "parentId", "parentType", "state", "content", "createdAt", "checkedAt" ], "additionalProperties": false } } }, "required": ["checklistItems"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "post": { "operationId": "createTaskChecklistItem", "summary": "Create a checklist item for a task", "tags": ["Checklist items"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["content"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "taskId", "required": true, "description": "Task identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "checklistItem": { "type": "object", "properties": { "type": { "type": "string", "enum": ["checklistItem"] }, "id": { "type": "string", "description": "Checklist item identifier" }, "parentId": { "type": "string", "description": "Task or task-template identifier" }, "parentType": { "type": "string", "enum": ["task", "template"] }, "state": { "type": "string", "enum": ["todo", "done"] }, "content": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "checkedAt": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "type", "id", "parentId", "parentType", "state", "content", "createdAt", "checkedAt" ], "additionalProperties": false } }, "required": ["checklistItem"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/task-templates/{templateId}/checklist-items": { "get": { "operationId": "listTaskTemplateChecklistItems", "summary": "List a task template's checklist items", "tags": ["Checklist items"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "templateId", "required": true, "description": "Task template identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "checklistItems": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["checklistItem"] }, "id": { "type": "string", "description": "Checklist item identifier" }, "parentId": { "type": "string", "description": "Task or task-template identifier" }, "parentType": { "type": "string", "enum": ["task", "template"] }, "state": { "type": "string", "enum": ["todo", "done"] }, "content": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "checkedAt": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "type", "id", "parentId", "parentType", "state", "content", "createdAt", "checkedAt" ], "additionalProperties": false } } }, "required": ["checklistItems"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "post": { "operationId": "createTaskTemplateChecklistItem", "summary": "Create a checklist item for a task template", "tags": ["Checklist items"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["content"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "templateId", "required": true, "description": "Task template identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "checklistItem": { "type": "object", "properties": { "type": { "type": "string", "enum": ["checklistItem"] }, "id": { "type": "string", "description": "Checklist item identifier" }, "parentId": { "type": "string", "description": "Task or task-template identifier" }, "parentType": { "type": "string", "enum": ["task", "template"] }, "state": { "type": "string", "enum": ["todo", "done"] }, "content": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "checkedAt": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "type", "id", "parentId", "parentType", "state", "content", "createdAt", "checkedAt" ], "additionalProperties": false } }, "required": ["checklistItem"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/checklist-items/{checklistItemId}": { "get": { "operationId": "getChecklistItem", "summary": "Get a checklist item", "tags": ["Checklist items"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "checklistItemId", "required": true, "description": "Checklist item identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "checklistItem": { "type": "object", "properties": { "type": { "type": "string", "enum": ["checklistItem"] }, "id": { "type": "string", "description": "Checklist item identifier" }, "parentId": { "type": "string", "description": "Task or task-template identifier" }, "parentType": { "type": "string", "enum": ["task", "template"] }, "state": { "type": "string", "enum": ["todo", "done"] }, "content": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "checkedAt": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "type", "id", "parentId", "parentType", "state", "content", "createdAt", "checkedAt" ], "additionalProperties": false } }, "required": ["checklistItem"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "patch": { "operationId": "updateChecklistItem", "summary": "Update a checklist item", "tags": ["Checklist items"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string" }, "state": { "type": "string", "enum": ["todo", "done"] } }, "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "checklistItemId", "required": true, "description": "Checklist item identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "checklistItem": { "type": "object", "properties": { "type": { "type": "string", "enum": ["checklistItem"] }, "id": { "type": "string", "description": "Checklist item identifier" }, "parentId": { "type": "string", "description": "Task or task-template identifier" }, "parentType": { "type": "string", "enum": ["task", "template"] }, "state": { "type": "string", "enum": ["todo", "done"] }, "content": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "checkedAt": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "type", "id", "parentId", "parentType", "state", "content", "createdAt", "checkedAt" ], "additionalProperties": false } }, "required": ["checklistItem"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } }, "delete": { "operationId": "deleteChecklistItem", "summary": "Delete a checklist item", "tags": ["Checklist items"], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "checklistItemId", "required": true, "description": "Checklist item identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "204": { "description": "Default Response" }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } }, "/api/v1/spaces/{spaceId}/checklist-items/{checklistItemId}/move": { "post": { "operationId": "moveChecklistItem", "summary": "Move a checklist item", "tags": ["Checklist items"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "parentId": { "type": "string", "minLength": 1 }, "parentType": { "type": "string", "enum": ["task", "template"] }, "placement": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "enum": ["first"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["last"] } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["before"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity before" } }, "required": ["kind", "anchorId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "enum": ["after"] }, "anchorId": { "type": "string", "minLength": 1, "description": "Sibling to place the entity after" } }, "required": ["kind", "anchorId"], "additionalProperties": false } ], "description": "Position within an ordered collection" } }, "required": ["parentId", "parentType", "placement"], "additionalProperties": false } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "spaceId", "required": true, "description": "Space identifier" }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "checklistItemId", "required": true, "description": "Checklist item identifier" } ], "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "checklistItem": { "type": "object", "properties": { "type": { "type": "string", "enum": ["checklistItem"] }, "id": { "type": "string", "description": "Checklist item identifier" }, "parentId": { "type": "string", "description": "Task or task-template identifier" }, "parentType": { "type": "string", "enum": ["task", "template"] }, "state": { "type": "string", "enum": ["todo", "done"] }, "content": { "type": "string" }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "checkedAt": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "type", "id", "parentId", "parentType", "state", "content", "createdAt", "checkedAt" ], "additionalProperties": false } }, "required": ["checklistItem"], "additionalProperties": false } } } }, "401": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "403": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "404": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "409": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } }, "500": { "description": "Error response", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } } } }