{ "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "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": [ "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "INTERNAL_SERVER_ERROR" ] }, "message": { "type": "string" } }, "required": ["code", "message"], "additionalProperties": false, "description": "Error response" } } } } } } } } }