{"openapi":"3.1.0","info":{"title":"iNEW Workspace API","version":"1.0.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"responses":{"RateLimit":{"description":"API rate limit exceeded","headers":{"Retry-After":{"description":"Seconds until the client can retry.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Maximum requests per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current minute.","schema":{"type":"integer"}}}}},"schemas":{"OrganizationMember":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string"},"member_type":{"type":"string","enum":["employee","contractor"]},"company_name":{"type":["string","null"]},"access_expires_at":{"type":["string","null"],"format":"date-time"},"job_title":{"type":["string","null"]},"phone":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"OrganizationMemberWrite":{"type":"object","properties":{"role":{"type":"string","enum":["org_owner","org_admin","member","viewer"]},"member_type":{"type":"string","enum":["employee","contractor"]},"company_name":{"type":["string","null"],"maxLength":255},"access_expires_at":{"type":["string","null"],"format":"date-time"}}},"OrganizationInvite":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email"},"role":{"type":"string"},"member_type":{"type":"string","enum":["employee","contractor"]},"company_name":{"type":["string","null"]},"access_expires_at":{"type":["string","null"],"format":"date-time"},"invited_by_id":{"type":["integer","null"]},"invited_by_email":{"type":["string","null"],"format":"email"},"accept_url":{"type":"string","format":"uri"},"expires_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"is_acceptable":{"type":"boolean"}}},"OrganizationInviteWrite":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":255},"role":{"type":"string","enum":["org_admin","member","viewer"]},"member_type":{"type":"string","enum":["employee","contractor"]},"company_name":{"type":["string","null"],"maxLength":255},"access_expires_at":{"type":["string","null"],"format":"date-time"}}},"SubscriptionUsage":{"type":"object","properties":{"seats":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":["integer","null"]},"remaining":{"type":["integer","null"]},"percent":{"type":"integer"},"exceeded":{"type":"boolean"},"members":{"type":"integer"},"pending_invites":{"type":"integer"}}},"spaces":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":["integer","null"]},"remaining":{"type":["integer","null"]},"percent":{"type":"integer"},"exceeded":{"type":"boolean"},"archived":{"type":"integer"}}},"projects":{"type":"object","properties":{"active":{"type":"integer"},"archived":{"type":"integer"}}},"tasks":{"type":"object","properties":{"active":{"type":"integer"},"open":{"type":"integer"},"completed":{"type":"integer"},"archived":{"type":"integer"}}},"documents":{"type":"object","properties":{"active":{"type":"integer"},"public":{"type":"integer"},"archived":{"type":"integer"}}},"regulations":{"type":"object","properties":{"total":{"type":"integer"},"published":{"type":"integer"},"draft":{"type":"integer"},"required":{"type":"integer"},"archived":{"type":"integer"}}},"api_tokens":{"type":"object","properties":{"active":{"type":"integer"},"expired":{"type":"integer"},"revoked":{"type":"integer"}}},"integrations":{"type":"object","properties":{"configured":{"type":"integer"},"enabled":{"type":"integer"}}}}},"Space":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"name":{"type":"string"},"group_name":{"type":["string","null"]},"slug":{"type":"string"},"icon":{"type":["string","null"]},"accent_color":{"type":["string","null"]},"background_path":{"type":["string","null"]},"sort_order":{"type":"integer"},"archived_at":{"type":["string","null"],"format":"date-time"},"brand":{"type":"object"}}},"SpaceWrite":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"group_name":{"type":["string","null"],"maxLength":255},"icon":{"type":["string","null"],"maxLength":255},"accent_color":{"type":["string","null"],"maxLength":32},"background_path":{"type":["string","null"],"maxLength":2048}}},"Project":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"space_id":{"type":"integer"},"name":{"type":"string"},"group_name":{"type":["string","null"]},"description":{"type":["string","null"]},"slug":{"type":"string"},"sort_order":{"type":"integer"},"archived_at":{"type":["string","null"],"format":"date-time"}}},"ProjectWrite":{"type":"object","properties":{"space_id":{"type":"integer"},"name":{"type":"string","maxLength":255},"group_name":{"type":["string","null"],"maxLength":255},"description":{"type":["string","null"]}}},"ProjectMembership":{"type":"object","properties":{"id":{"type":"integer"},"project_id":{"type":"integer"},"user_id":{"type":"integer"},"role":{"type":"string","enum":["owner","editor","viewer"]},"user":{"type":"object","properties":{"id":{"type":["integer","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"ProjectMembershipWrite":{"type":"object","properties":{"user_id":{"type":"integer"},"role":{"type":"string","enum":["owner","editor","viewer"]}}},"ProjectStage":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"project_id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"color":{"type":["string","null"]},"task_limit":{"type":["integer","null"]},"sort_order":{"type":"integer"},"tasks":{"type":"array","items":{"$ref":"#\/components\/schemas\/Task"}}}},"ProjectStageWrite":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"color":{"type":["string","null"],"maxLength":32},"task_limit":{"type":["integer","null"],"minimum":1},"sort_order":{"type":["integer","null"],"minimum":0}}},"BrowserPushSubscription":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"user_id":{"type":"integer"},"endpoint":{"type":"string","format":"uri"},"public_key":{"type":"string"},"content_encoding":{"type":"string"},"user_agent":{"type":["string","null"]},"enabled":{"type":"boolean"},"last_seen_at":{"type":["string","null"],"format":"date-time"}}},"BrowserPushSubscriptionWrite":{"type":"object","properties":{"endpoint":{"type":"string","format":"uri","maxLength":2048},"public_key":{"type":"string","maxLength":4096},"auth_token":{"type":"string","maxLength":4096},"content_encoding":{"type":["string","null"],"maxLength":32},"user_agent":{"type":["string","null"],"maxLength":255}}},"NotificationPreference":{"type":"object","properties":{"channel":{"type":"string","enum":["in_app","browser","telegram"]},"label":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"minimum_priority":{"type":"string","enum":["low","normal","high","critical"]},"minimum_priority_label":{"type":"string"},"priority_options":{"type":"object","additionalProperties":{"type":"string"}}}},"NotificationPreferenceWrite":{"type":"object","properties":{"preferences":{"type":"object","additionalProperties":{"type":"object","required":["minimum_priority"],"properties":{"enabled":{"type":"boolean"},"minimum_priority":{"type":"string","enum":["low","normal","high","critical"]}}}}}},"DocumentationPage":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"space_id":{"type":"integer"},"space_name":{"type":["string","null"]},"parent_id":{"type":"integer","nullable":true},"parent_title":{"type":["string","null"]},"title":{"type":"string"},"slug":{"type":"string"},"content":{"type":["string","null"]},"is_public":{"type":"boolean"},"public_url":{"type":["string","null"]},"depth":{"type":"integer"},"path":{"type":"array","items":{"type":"string"}},"versions_count":{"type":"integer"},"archived_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"DocumentationPageVersion":{"type":"object","properties":{"id":{"type":"integer"},"documentation_page_id":{"type":"integer"},"author_id":{"type":["integer","null"]},"author_name":{"type":["string","null"]},"version":{"type":"integer"},"content":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"DocumentationPageWrite":{"type":"object","properties":{"space_id":{"type":"integer"},"parent_id":{"type":"integer","nullable":true},"title":{"type":"string","maxLength":255},"content":{"type":["string","null"]}}},"RegulationCompletion":{"type":"object","properties":{"id":{"type":"integer"},"regulation_id":{"type":"integer"},"user_id":{"type":"integer"},"user_name":{"type":["string","null"]},"user_email":{"type":["string","null"],"format":"email"},"score":{"type":"integer"},"total":{"type":"integer"},"passed":{"type":"boolean"},"answers":{"type":"object"},"completed_at":{"type":["string","null"],"format":"date-time"}}},"Regulation":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"space_id":{"type":"integer"},"space_name":{"type":["string","null"]},"title":{"type":"string"},"slug":{"type":"string"},"content":{"type":["string","null"]},"status":{"type":"string","enum":["draft","published"]},"is_required":{"type":"boolean"},"questions_count":{"type":"integer"},"completions_count":{"type":"integer"},"archived_at":{"type":["string","null"],"format":"date-time"}}},"RegulationWrite":{"type":"object","properties":{"space_id":{"type":"integer"},"title":{"type":"string","maxLength":255},"content":{"type":["string","null"]},"is_required":{"type":["boolean","null"]},"status":{"type":["string","null"],"enum":["draft","published"]}}},"RegulationQuestion":{"type":"object","properties":{"id":{"type":"integer"},"regulation_id":{"type":"integer"},"text":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"text":{"type":"string"},"is_correct":{"type":"boolean"}}}}}},"RegulationQuestionWrite":{"type":"object","properties":{"text":{"type":"string","maxLength":1000},"sort_order":{"type":"integer","minimum":0},"answers":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":1000},"is_correct":{"type":["boolean","null"]}}}}}},"Task":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"project_id":{"type":"integer"},"project_stage_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":["string","null"]},"priority":{"type":"string"},"status":{"type":"string"},"cover_url":{"type":["string","null"],"format":"uri"},"starts_at":{"type":["string","null"],"format":"date-time"},"due_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string","format":"email"}}}},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string","format":"email"}}}},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"color":{"type":["string","null"]}}}},"checklist":{"type":"array","items":{"$ref":"#\/components\/schemas\/TaskChecklistItem"}},"comments":{"type":"array","items":{"$ref":"#\/components\/schemas\/TaskComment"}},"time_entries":{"type":"array","items":{"$ref":"#\/components\/schemas\/TimerEntry"}},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"event":{"type":"string"},"actor_id":{"type":["integer","null"]},"actor_name":{"type":["string","null"]},"properties":{"type":"object"},"created_at":{"type":["string","null"],"format":"date-time"}}}},"total_time_seconds":{"type":"integer"},"archived_at":{"type":["string","null"],"format":"date-time"}}},"TaskWrite":{"type":"object","properties":{"project_id":{"type":"integer"},"project_stage_id":{"type":"integer"},"name":{"type":"string","maxLength":255},"description":{"type":["string","null"]},"priority":{"type":["string","null"],"maxLength":32},"status":{"type":["string","null"],"maxLength":32},"cover_url":{"type":["string","null"],"format":"uri","maxLength":2048},"starts_at":{"type":["string","null"],"format":"date-time"},"due_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"assignee_ids":{"type":["array","null"],"items":{"type":"integer"}},"watcher_ids":{"type":["array","null"],"items":{"type":"integer"}},"labels":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":["integer","null"]},"name":{"type":["string","null"],"maxLength":80},"color":{"type":["string","null"],"maxLength":32}}}}}},"TaskChecklistItem":{"type":"object","properties":{"id":{"type":"integer"},"task_id":{"type":"integer"},"name":{"type":"string"},"is_completed":{"type":"boolean"},"sort_order":{"type":"integer"}}},"TaskChecklistItemWrite":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":255},"is_completed":{"type":["boolean","null"]},"sort_order":{"type":["integer","null"],"minimum":0}}},"TaskComment":{"type":"object","properties":{"id":{"type":"integer"},"task_id":{"type":"integer"},"author_id":{"type":["integer","null"]},"author_name":{"type":["string","null"]},"body":{"type":"string"},"reactions":{"type":"object","additionalProperties":{"type":"integer"}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"TaskCommentWrite":{"type":"object","properties":{"body":{"type":"string","maxLength":5000}}},"TimerEntry":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"task_id":{"type":"integer"},"project_id":{"type":["integer","null"]},"space_id":{"type":["integer","null"]},"user_id":{"type":"integer"},"status":{"type":"string","enum":["running","stopped"]},"started_at":{"type":["string","null"],"format":"date-time"},"stopped_at":{"type":["string","null"],"format":"date-time"},"duration_seconds":{"type":"integer"},"note":{"type":["string","null"]},"task":{"type":"object"},"project":{"type":"object"},"space":{"type":"object"},"user":{"type":"object"}}},"AnalyticsReportRow":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"tasks_total":{"type":"integer"},"tasks_open":{"type":"integer"},"tasks_completed":{"type":"integer"},"time_seconds":{"type":"integer"},"time_human":{"type":"string"}}},"IntegrationDelivery":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"integration_connection_id":{"type":"integer"},"connection_name":{"type":["string","null"]},"provider":{"type":"string"},"event_type":{"type":"string"},"payload":{"type":"object"},"status":{"type":"string","enum":["queued","delivered","failed"]},"attempts":{"type":"integer"},"available_at":{"type":["string","null"],"format":"date-time"},"last_attempted_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"failed_at":{"type":["string","null"],"format":"date-time"},"error":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"AiRagResult":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"space_id":{"type":"integer"},"snippet":{"type":"string"},"score":{"type":"integer"},"matched_terms":{"type":"array","items":{"type":"string"}},"updated_at":{"type":["string","null"],"format":"date-time"}}}}},"paths":{"\/api\/v1\/profile":{"get":{"summary":"Current API profile","security":[{"bearerAuth":[]}],"responses":{"429":{"$ref":"#\/components\/responses\/RateLimit"}}}},"\/api\/v1\/organization":{"get":{"summary":"Current organization","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Current organization, subscription, branding, and usage counters.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"primary_color":{"type":"string"},"logo_path":{"type":["string","null"]},"favicon_path":{"type":["string","null"]},"settings":{"type":"object"},"members":{"type":"object"},"spaces":{"type":"object"},"subscription":{"type":"object"},"usage":{"$ref":"#\/components\/schemas\/SubscriptionUsage"}}}}}}}}}}},"\/api\/v1\/organization\/branding":{"patch":{"summary":"Update organization branding","security":[{"bearerAuth":[]}]}},"\/api\/v1\/organization\/members":{"get":{"summary":"List organization members","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Members in the current organization.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/OrganizationMember"}}}}}}}}}},"\/api\/v1\/organization\/members\/{user}":{"patch":{"summary":"Update organization member role","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/OrganizationMemberWrite"}}}}},"delete":{"summary":"Remove organization member","security":[{"bearerAuth":[]}]}},"\/api\/v1\/organization\/invites":{"get":{"summary":"List organization invites","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Invites for the current organization.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/OrganizationInvite"}}}}}}}}},"post":{"summary":"Create organization invite","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/OrganizationInviteWrite"}}}}}},"\/api\/v1\/organization\/invites\/{invite}":{"delete":{"summary":"Cancel organization invite","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Pending organization invite cancelled.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"invite_id":{"type":"integer"}}}}}}}}}}},"\/api\/v1\/spaces":{"get":{"summary":"List spaces","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Spaces for the current organization.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Space"}}}}}}}}},"post":{"summary":"Create space","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SpaceWrite"}}}},"responses":{"201":{"description":"Created space.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Space"}}}}}}}}},"\/api\/v1\/spaces\/{space}":{"patch":{"summary":"Update space","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SpaceWrite"}}}}}},"\/api\/v1\/spaces\/{space}\/archive":{"post":{"summary":"Archive space","security":[{"bearerAuth":[]}]}},"\/api\/v1\/spaces\/{space}\/restore":{"post":{"summary":"Restore archived space","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Restored space without automatically restoring archived projects or tasks.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Space"}}}}}},"422":{"description":"Space limit for the current subscription has been reached."}}}},"\/api\/v1\/projects":{"get":{"summary":"List projects","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Projects visible to the current API user.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Project"}}}}}}}}},"post":{"summary":"Create project","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProjectWrite"}}}}}},"\/api\/v1\/projects\/{project}":{"get":{"summary":"Get project board","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Project with stages and active tasks grouped for board views.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#\/components\/schemas\/Project"},{"type":"object","properties":{"stages":{"type":"array","items":{"$ref":"#\/components\/schemas\/ProjectStage"}}}}]}}}}}}}},"patch":{"summary":"Update project","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProjectWrite"}}}}}},"\/api\/v1\/projects\/{project}\/archive":{"post":{"summary":"Archive project","security":[{"bearerAuth":[]}]}},"\/api\/v1\/projects\/{project}\/restore":{"post":{"summary":"Restore archived project","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Restored project without automatically restoring archived tasks.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Project"}}}}}},"422":{"description":"Project cannot be restored while its space is archived."}}}},"\/api\/v1\/projects\/{project}\/stages":{"post":{"summary":"Create project stage","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProjectStageWrite"}}}}}},"\/api\/v1\/projects\/{project}\/memberships":{"get":{"summary":"List project memberships","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Project-specific role assignments for members.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ProjectMembership"}}}}}}}}},"post":{"summary":"Upsert project membership","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProjectMembershipWrite"}}}},"responses":{"200":{"description":"Updated project membership.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ProjectMembership"}}}}}},"201":{"description":"Created project membership.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ProjectMembership"}}}}}}}}},"\/api\/v1\/projects\/{project}\/memberships\/{membership}":{"delete":{"summary":"Delete project membership","security":[{"bearerAuth":[]}]}},"\/api\/v1\/project-stages\/{stage}":{"patch":{"summary":"Update project stage","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProjectStageWrite"}}}}},"delete":{"summary":"Delete project stage","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"target_stage_id":{"type":["integer","null"]}}}}}},"responses":{"200":{"description":"Deleted project stage and optionally reassigned tasks.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean"},"project_stage_id":{"type":"integer"},"target_stage_id":{"type":["integer","null"]},"moved_tasks":{"type":"integer"}}}}}}}}}}},"\/api\/v1\/tasks":{"get":{"summary":"List tasks","security":[{"bearerAuth":[]}]},"post":{"summary":"Create task","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TaskWrite"}}}},"responses":{"201":{"description":"Created task.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Task"}}}}}}}}},"\/api\/v1\/tasks\/{task}":{"get":{"summary":"Get task details","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Task details.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Task"}}}}}}}},"patch":{"summary":"Update task","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TaskWrite"}}}}}},"\/api\/v1\/tasks\/{task}\/checklist":{"post":{"summary":"Create task checklist item","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TaskChecklistItemWrite"}}}},"responses":{"201":{"description":"Created task checklist item.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/TaskChecklistItem"}}}}}}}}},"\/api\/v1\/checklist-items\/{item}":{"patch":{"summary":"Update task checklist item","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TaskChecklistItemWrite"}}}},"responses":{"200":{"description":"Updated task checklist item.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/TaskChecklistItem"}}}}}}}},"delete":{"summary":"Delete task checklist item","security":[{"bearerAuth":[]}]}},"\/api\/v1\/tasks\/{task}\/comments":{"post":{"summary":"Create task comment","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TaskCommentWrite"}}}},"responses":{"201":{"description":"Created task comment.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/TaskComment"}}}}}}}}},"\/api\/v1\/task-comments\/{comment}":{"patch":{"summary":"Update task comment","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TaskCommentWrite"}}}},"responses":{"200":{"description":"Updated task comment.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/TaskComment"}}}}}}}},"delete":{"summary":"Delete task comment","security":[{"bearerAuth":[]}]}},"\/api\/v1\/task-comments\/{comment}\/reactions":{"post":{"summary":"React to task comment","security":[{"bearerAuth":[]}]}},"\/api\/v1\/tasks\/{task}\/time\/start":{"post":{"summary":"Start task timer","security":[{"bearerAuth":[]}]}},"\/api\/v1\/tasks\/{task}\/time\/stop":{"post":{"summary":"Stop task timer","security":[{"bearerAuth":[]}]}},"\/api\/v1\/timers":{"get":{"summary":"List timers and time entries","security":[{"bearerAuth":[]}],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["all","running","stopped"]}},{"name":"project_id","in":"query","schema":{"type":"integer"}},{"name":"task_id","in":"query","schema":{"type":"integer"}},{"name":"user_id","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Tenant-scoped timer entries visible to the token user.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TimerEntry"}}}}}}}}}},"\/api\/v1\/tasks\/{task}\/archive":{"post":{"summary":"Archive task","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Archived task.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Task"}}}}}}}}},"\/api\/v1\/tasks\/{task}\/restore":{"post":{"summary":"Restore archived task","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Restored task.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Task"}}}}}},"422":{"description":"Task cannot be restored because parent entities are archived or the stage WIP limit is full."}}}},"\/api\/v1\/analytics\/summary":{"get":{"summary":"Organization analytics summary","security":[{"bearerAuth":[]}]}},"\/api\/v1\/analytics\/reports":{"get":{"summary":"Detailed analytics reports","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Space, project, and member analytics reports.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"spaces":{"type":"array","items":{"$ref":"#\/components\/schemas\/AnalyticsReportRow"}},"projects":{"type":"array","items":{"$ref":"#\/components\/schemas\/AnalyticsReportRow"}},"members":{"type":"array","items":{"type":"object"}}}}}}}}}}}},"\/api\/v1\/notifications":{"get":{"summary":"List notifications","security":[{"bearerAuth":[]}]}},"\/api\/v1\/notifications\/bulk":{"patch":{"summary":"Bulk update notification status","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["action","notification_ids"],"properties":{"action":{"type":"string","enum":["mark_read","mark_unread"]},"notification_ids":{"type":"array","items":{"type":"integer"},"minItems":1,"maxItems":100}}}}}}}},"\/api\/v1\/notifications\/{notification}\/read":{"patch":{"summary":"Mark notification as read","security":[{"bearerAuth":[]}]}},"\/api\/v1\/notifications\/read-all":{"patch":{"summary":"Mark all notifications as read","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Unread in-app notifications marked as read.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"marked_read":{"type":"integer"},"read_at":{"type":"string","format":"date-time"}}}}}}}}}}},"\/api\/v1\/notification-preferences":{"get":{"summary":"List notification preferences","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Notification delivery preferences for the current API user.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"$ref":"#\/components\/schemas\/NotificationPreference"}}}}}}}}},"put":{"summary":"Update notification preferences","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/NotificationPreferenceWrite"}}}},"responses":{"200":{"description":"Updated notification delivery preferences.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"$ref":"#\/components\/schemas\/NotificationPreference"}}}}}}}}}},"\/api\/v1\/notification-subscriptions":{"get":{"summary":"List browser push subscriptions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Browser push subscriptions for the current API user.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/BrowserPushSubscription"}}}}}}}}},"put":{"summary":"Upsert browser push subscription","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BrowserPushSubscriptionWrite"}}}}}},"\/api\/v1\/notification-subscriptions\/{subscription}":{"delete":{"summary":"Disable browser push subscription","security":[{"bearerAuth":[]}]}},"\/api\/v1\/integrations":{"get":{"summary":"List integrations","security":[{"bearerAuth":[]}]}},"\/api\/v1\/integration-deliveries":{"get":{"summary":"List integration delivery outbox","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Recent integration delivery attempts for the current organization.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/IntegrationDelivery"}}}}}}}}}},"\/api\/v1\/integrations\/{provider}":{"put":{"summary":"Configure integration","security":[{"bearerAuth":[]}]}},"\/api\/v1\/integrations\/{provider}\/test":{"post":{"summary":"Test integration","security":[{"bearerAuth":[]}]}},"\/api\/v1\/import-export\/tasks.csv":{"get":{"summary":"Export tasks CSV","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"CSV file with tenant-scoped tasks visible to the token user.","content":{"text\/csv":{"schema":{"type":"string"}}}}}}},"\/api\/v1\/import-export\/tasks":{"post":{"summary":"Import tasks CSV","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"project_id":{"type":"integer"},"project_stage_id":{"type":"integer"},"csv":{"type":"string"}}}}}}}},"\/api\/v1\/partner\/status":{"get":{"summary":"Partner API status","security":[{"bearerAuth":[]}]}},"\/api\/v1\/ai\/status":{"get":{"summary":"AI module status","security":[{"bearerAuth":[]}]}},"\/api\/v1\/ai\/rag\/query":{"post":{"summary":"Run local RAG query","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","minLength":2,"maxLength":255},"limit":{"type":"integer","minimum":1,"maximum":10}}}}}},"responses":{"200":{"description":"Ranked local retrieval results from organization documentation.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"mode":{"type":"string","enum":["local_retrieval"]},"query":{"type":"string"},"terms":{"type":"array","items":{"type":"string"}},"results":{"type":"array","items":{"$ref":"#\/components\/schemas\/AiRagResult"}}}}}}}}}}}},"\/api\/v1\/docs":{"get":{"summary":"List documentation pages","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Documentation pages in tree order.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/DocumentationPage"}}}}}}}}},"post":{"summary":"Create documentation page","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/DocumentationPageWrite"}}}}}},"\/api\/v1\/docs\/{page}":{"get":{"summary":"Get documentation page","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Documentation page details.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/DocumentationPage"}}}}}}}},"patch":{"summary":"Update documentation page and record version","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/DocumentationPageWrite"}}}}}},"\/api\/v1\/docs\/{page}\/versions":{"get":{"summary":"List documentation page versions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Version history for a documentation page.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/DocumentationPageVersion"}}}}}}}}}},"\/api\/v1\/docs\/{page}\/versions\/{version}\/restore":{"post":{"summary":"Restore documentation page version","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Restored documentation page content as a new version.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/DocumentationPage"}}}}}}}}},"\/api\/v1\/docs\/{page}\/publish":{"post":{"summary":"Publish documentation page public link","security":[{"bearerAuth":[]}]}},"\/api\/v1\/docs\/{page}\/archive":{"post":{"summary":"Archive documentation page","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Archived documentation page.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/DocumentationPage"}}}}}}}}},"\/api\/v1\/docs\/{page}\/restore":{"post":{"summary":"Restore archived documentation page","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Restored documentation page.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/DocumentationPage"}}}}}},"422":{"description":"Documentation page cannot be restored while its parent page or space is archived."}}}},"\/api\/v1\/regulations":{"get":{"summary":"List regulations","security":[{"bearerAuth":[]}]},"post":{"summary":"Create regulation","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RegulationWrite"}}}}}},"\/api\/v1\/regulations\/{regulation}":{"get":{"summary":"Get regulation details","security":[{"bearerAuth":[]}]},"patch":{"summary":"Update regulation","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RegulationWrite"}}}},"responses":{"200":{"description":"Updated regulation.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Regulation"}}}}}}}}},"\/api\/v1\/regulations\/{regulation}\/completions":{"get":{"summary":"List regulation completions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Completion report for a regulation.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/RegulationCompletion"}}}}}}}}}},"\/api\/v1\/regulations\/{regulation}\/questions":{"post":{"summary":"Create regulation question with answers","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RegulationQuestionWrite"}}}},"responses":{"201":{"description":"Created regulation question.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/RegulationQuestion"}}}}}}}}},"\/api\/v1\/regulation-questions\/{question}":{"patch":{"summary":"Update regulation question","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RegulationQuestionWrite"}}}},"responses":{"200":{"description":"Updated regulation question.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/RegulationQuestion"}}}}}}}},"delete":{"summary":"Delete regulation question","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Deleted regulation question.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean"},"question_id":{"type":"integer"}}}}}}}}}}},"\/api\/v1\/regulations\/{regulation}\/publish":{"post":{"summary":"Publish regulation","security":[{"bearerAuth":[]}]}},"\/api\/v1\/regulations\/{regulation}\/archive":{"post":{"summary":"Archive regulation","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Archived regulation.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Regulation"}}}}}}}}},"\/api\/v1\/regulations\/{regulation}\/restore":{"post":{"summary":"Restore archived regulation","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Restored regulation.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Regulation"}}}}}},"422":{"description":"Regulation cannot be restored while its space is archived."}}}},"\/api\/v1\/regulations\/{regulation}\/complete":{"post":{"summary":"Complete regulation test","security":[{"bearerAuth":[]}]}}}}