{"components":{"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request is malformed or breaks a validation rule (BAD_REQUEST or VALIDATION_ERROR)."},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The token's scopes or workspace limit, or the user's role, do not allow the request (FORBIDDEN)."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The resource does not exist or the user cannot see it (NOT_FOUND)."},"TooManyRequests":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests (RATE_LIMITED). Retry after the number of seconds in the Retry-After header."},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The token is missing, unknown, expired or revoked (UNAUTHORIZED)."}},"schemas":{"AddTeamMemberRequest":{"properties":{"user_id":{"format":"uuid","type":"string"}},"required":["user_id"],"type":"object"},"AttachWikiReferenceRequest":{"properties":{"page_id":{"type":"string"}},"type":"object"},"BulkCreateSubIssueRequest":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/CreateSubIssueRequest"},"minItems":1,"type":"array"}},"required":["issues"],"type":"object"},"BulkDeleteIssue":{"properties":{"deleted":{"type":"integer"},"restorable_until":{"format":"date-time","type":"string"}},"required":["deleted","restorable_until"],"type":"object"},"BulkDeleteIssueRequest":{"properties":{"issue_ids":{"items":{"format":"uuid","type":"string"},"minItems":1,"type":"array"}},"required":["issue_ids"],"type":"object"},"BulkIssueUndo":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BulkIssueUndoItem"},"maxItems":5000,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"BulkIssueUndoInput":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BulkIssueUndoItemInput"},"maxItems":5000,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"BulkIssueUndoItem":{"properties":{"expected_version":{"minimum":1,"type":"integer"},"id":{"format":"uuid","type":"string"},"previous":{"$ref":"#/components/schemas/IssueUndoPrevious"}},"required":["id","expected_version","previous"],"type":"object"},"BulkIssueUndoItemInput":{"properties":{"expected_version":{"minimum":1,"type":"integer"},"id":{"format":"uuid","type":"string"},"previous":{"$ref":"#/components/schemas/IssueUndoPreviousInput"}},"required":["id"],"type":"object"},"BulkRestoreIssue":{"properties":{"restored":{"type":"integer"}},"required":["restored"],"type":"object"},"BulkRestoreIssueRequest":{"properties":{"issue_ids":{"items":{"format":"uuid","type":"string"},"maxItems":5000,"minItems":1,"type":"array"}},"required":["issue_ids"],"type":"object"},"BulkUndoIssue":{"properties":{"updated":{"type":"integer"}},"required":["updated"],"type":"object"},"BulkUpdateIssue":{"properties":{"undo":{"$ref":"#/components/schemas/BulkIssueUndo"},"updated":{"type":"integer"}},"required":["updated"],"type":"object"},"BulkUpdateIssueRequest":{"properties":{"assignee_id":{"format":"uuid","type":["string","null"]},"cycle_id":{"type":["string","null"]},"issue_ids":{"items":{"format":"uuid","type":"string"},"minItems":1,"type":"array"},"label_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"parent_id":{"type":["string","null"]},"priority":{"maximum":4,"minimum":0,"type":["integer","null"]},"project_id":{"type":["string","null"]},"status":{"enum":["backlog","todo","in_progress","in_review","done","cancelled"],"type":["string","null"]},"status_id":{"format":"uuid","type":["string","null"]}},"required":["issue_ids"],"type":"object"},"BurndownPoint":{"properties":{"completed":{"type":"integer"},"date":{"type":"string"},"scope":{"type":"integer"},"started":{"type":"integer"}},"required":["date","scope","started","completed"],"type":"object"},"Comment":{"properties":{"agent_task_id":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"edited_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"issue_id":{"type":"string"},"parent_id":{"type":"string"},"replies":{"items":{"$ref":"#/components/schemas/Comment"},"type":"array"},"resolved_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"user":{"$ref":"#/components/schemas/User"},"user_id":{"type":"string"}},"required":["id","issue_id","user_id","body","created_at","updated_at"],"type":"object"},"CommentEventDelivery":{"properties":{"event":{"enum":["comment.created","comment.updated","comment.deleted"],"type":"string"},"payload":{"$ref":"#/components/schemas/WebhookCommentPayload"},"timestamp":{"type":"string"}},"required":["event","payload","timestamp"],"type":"object"},"CompleteCycleRequest":{"properties":{"carry_over":{"type":"boolean"},"retrospective":{"type":["string","null"]}},"type":"object"},"CompleteCycleResult":{"properties":{"carried_over_count":{"type":"integer"},"cycle":{"$ref":"#/components/schemas/Cycle"}},"required":["cycle","carried_over_count"],"type":"object"},"ConvertIssueToProject":{"properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"],"type":"object"},"CreateCommentRequest":{"properties":{"body":{"minLength":1,"type":"string"},"parent_id":{"format":"uuid","type":["string","null"]}},"required":["body"],"type":"object"},"CreateCycleRequest":{"properties":{"description":{"type":["string","null"]},"end_date":{"type":"string"},"goals":{"type":["string","null"]},"name":{"maxLength":100,"minLength":1,"type":"string"},"start_date":{"type":"string"}},"required":["name","start_date","end_date"],"type":"object"},"CreateIssueRelationRequest":{"properties":{"related_identifier":{"type":"string"},"type":{"enum":["related","blocked_by","blocking","duplicate"],"type":"string"}},"required":["related_identifier","type"],"type":"object"},"CreateIssueRequest":{"properties":{"assignee_id":{"format":"uuid","type":["string","null"]},"assignee_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"cycle_id":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"due_date":{"type":["string","null"]},"label_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"parent_id":{"format":"uuid","type":["string","null"]},"priority":{"maximum":4,"minimum":0,"type":["integer","null"]},"project_id":{"format":"uuid","type":["string","null"]},"status":{"maxLength":100,"type":"string"},"status_id":{"format":"uuid","type":["string","null"]},"team_id":{"format":"uuid","type":"string"},"title":{"maxLength":500,"minLength":1,"type":"string"}},"required":["title","team_id"],"type":"object"},"CreateLabelRequest":{"properties":{"color":{"pattern":"^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":"string"},"description":{"type":["string","null"]},"name":{"maxLength":50,"minLength":1,"type":"string"},"parent_id":{"format":"uuid","type":["string","null"]},"project_id":{"format":"uuid","type":["string","null"]}},"required":["name","color"],"type":"object"},"CreateProjectRequest":{"properties":{"color":{"maxLength":7,"type":["string","null"]},"description":{"type":["string","null"]},"icon":{"maxLength":50,"type":["string","null"]},"lead_id":{"format":"uuid","type":["string","null"]},"name":{"maxLength":200,"minLength":1,"type":"string"},"start_date":{"type":["string","null"]},"target_date":{"type":["string","null"]},"team_id":{"format":"uuid","type":["string","null"]}},"required":["name"],"type":"object"},"CreateSubIssueRequest":{"properties":{"assignee_id":{"format":"uuid","type":["string","null"]},"assignee_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"cycle_id":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"due_date":{"type":["string","null"]},"label_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"priority":{"maximum":4,"minimum":0,"type":["integer","null"]},"project_id":{"format":"uuid","type":["string","null"]},"status":{"maxLength":100,"type":"string"},"status_id":{"format":"uuid","type":["string","null"]},"title":{"maxLength":500,"minLength":1,"type":"string"}},"required":["title"],"type":"object"},"CreateTeamRequest":{"properties":{"acknowledge_privacy_limitations":{"type":"boolean"},"color":{"type":["string","null"]},"description":{"type":["string","null"]},"icon":{"type":["string","null"]},"is_private":{"type":"boolean"},"key":{"maxLength":10,"minLength":1,"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"}},"required":["name","key"],"type":"object"},"CreateTeamStatusRequest":{"properties":{"category":{"enum":["backlog","unstarted","started","completed","cancelled"],"type":"string"},"color":{"type":["string","null"]},"name":{"maxLength":100,"minLength":1,"type":"string"},"project_ids":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["name","category"],"type":"object"},"CreateViewRequest":{"properties":{"color":{"type":["string","null"]},"description":{"type":["string","null"]},"filters":{"description":"Any JSON value."},"icon":{"type":["string","null"]},"is_shared":{"type":"boolean"},"name":{"maxLength":100,"minLength":1,"type":"string"}},"required":["name","filters"],"type":"object"},"CreateWebhookRequest":{"properties":{"events":{"items":{"enum":["issue.created","issue.updated","issue.deleted","issue.triaged","comment.created","comment.updated","comment.deleted"],"type":"string"},"minItems":1,"type":"array"},"secret":{"minLength":8,"type":"string"},"url":{"format":"uri","type":"string"}},"required":["url","secret","events"],"type":"object"},"CreateWikiPageRequest":{"properties":{"content":{"type":"string"},"title":{"type":"string"}},"type":"object"},"CreateWikiTreePageRequest":{"properties":{"content":{"type":"string"},"kind":{"type":"string"},"parent_id":{"type":["string","null"]},"title":{"type":"string"}},"type":"object"},"Cycle":{"properties":{"completed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"end_date":{"format":"date-time","type":["string","null"]},"goals":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"},"number":{"type":"integer"},"progress":{"$ref":"#/components/schemas/CycleProgress"},"retrospective":{"type":["string","null"]},"start_date":{"format":"date-time","type":["string","null"]},"status":{"type":"string"},"team_id":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","team_id","name","number","status","description","goals","retrospective","start_date","end_date","completed_at","created_at","updated_at"],"type":"object"},"CycleProgress":{"properties":{"cancelled":{"type":"integer"},"completed":{"type":"integer"},"total":{"type":"integer"}},"required":["total","completed","cancelled"],"type":"object"},"DeleteComment":{"properties":{"restorable_until":{"format":"date-time","type":"string"},"status":{"type":"string"}},"required":["status","restorable_until"],"type":"object"},"DeleteIssue":{"properties":{"restorable_until":{"format":"date-time","type":"string"},"status":{"type":"string"}},"required":["status","restorable_until"],"type":"object"},"DeleteWikiPage":{"properties":{"restorable_until":{"format":"date-time","type":"string"},"status":{"type":"string"}},"required":["status","restorable_until"],"type":"object"},"DuplicateIssueRequest":{"properties":{"include_sub_issues":{"type":"boolean"}},"type":"object"},"Error":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"required":["error"],"type":"object"},"ErrorBody":{"properties":{"code":{"type":"string"},"details":{"items":{"$ref":"#/components/schemas/ErrorDetail"},"type":"array"},"message":{"type":"string"},"workspace_slug":{"type":"string"}},"required":["code","message"],"type":"object"},"ErrorDetail":{"properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"],"type":"object"},"InviteMemberRequest":{"properties":{"email":{"format":"email","type":"string"},"role":{"enum":["admin","member","guest"],"type":"string"}},"required":["email","role"],"type":"object"},"Issue":{"properties":{"agent_assignees":{"items":{"$ref":"#/components/schemas/IssueAgentAssignee"},"type":"array"},"assignee":{"$ref":"#/components/schemas/User"},"assignee_id":{"type":["string","null"]},"assignees":{"items":{"$ref":"#/components/schemas/User"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"creator":{"$ref":"#/components/schemas/User"},"creator_id":{"type":"string"},"cycle_id":{"type":["string","null"]},"description":{"type":["string","null"]},"due_date":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"identifier":{"type":"string"},"is_subscribed":{"type":"boolean"},"labels":{"items":{"$ref":"#/components/schemas/Label"},"type":"array"},"parent":{"$ref":"#/components/schemas/IssueSummary"},"parent_id":{"type":["string","null"]},"priority":{"type":"integer"},"project_id":{"type":["string","null"]},"relation_counts":{"$ref":"#/components/schemas/IssueRelationCounts"},"relation_summary":{"$ref":"#/components/schemas/IssueRelationSummary"},"sort_order":{"type":"number"},"status":{"type":"string"},"status_id":{"type":"string"},"status_info":{"$ref":"#/components/schemas/StatusInfo"},"sub_issue_count":{"type":"integer"},"sub_issue_done":{"type":"integer"},"team_id":{"type":"string"},"title":{"type":"string"},"undo":{"$ref":"#/components/schemas/IssueUndo"},"updated_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","identifier","title","description","status","priority","team_id","project_id","cycle_id","creator_id","assignee_id","parent_id","due_date","sort_order","is_subscribed","created_at","updated_at","version"],"type":"object"},"IssueAgentAssignee":{"properties":{"assigned_by":{"format":"uuid","type":["string","null"]},"assigned_by_name":{"type":["string","null"]},"avatar_color":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"type":"string"},"harness":{"type":"string"},"id":{"format":"uuid","type":"string"},"issue_id":{"format":"uuid","type":"string"},"model":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"task_id":{"format":"uuid","type":["string","null"]},"task_reason":{"type":["string","null"]},"task_state":{"type":["string","null"]}},"required":["issue_id","id","name","role","harness","model","avatar_color","assigned_by","assigned_by_name","task_id","task_state","task_reason","created_at"],"type":"object"},"IssueEventDelivery":{"properties":{"event":{"enum":["issue.created","issue.updated","issue.deleted","issue.triaged"],"type":"string"},"payload":{"$ref":"#/components/schemas/WebhookIssuePayload"},"timestamp":{"type":"string"}},"required":["event","payload","timestamp"],"type":"object"},"IssueHistory":{"properties":{"agent":{"type":"string"},"agent_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"field":{"type":"string"},"id":{"type":"string"},"issue_id":{"type":"string"},"new_display_value":{"type":"string"},"new_value":{"type":["string","null"]},"old_display_value":{"type":"string"},"old_value":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["id","issue_id","user_id","field","old_value","new_value","created_at"],"type":"object"},"IssueList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"},"has_more":{"type":"boolean"},"page":{"type":"integer"},"per_page":{"type":"integer"},"total_count":{"type":"integer"}},"required":["data","total_count","page","per_page","has_more"],"type":"object"},"IssueRelation":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"issue_id":{"type":"string"},"related_issue":{"$ref":"#/components/schemas/Issue"},"related_issue_id":{"type":"string"},"type":{"type":"string"}},"required":["id","issue_id","related_issue_id","type","created_at"],"type":"object"},"IssueRelationCounts":{"properties":{"blocked_by":{"type":"integer"},"blocking":{"type":"integer"},"duplicate":{"type":"integer"},"related":{"type":"integer"}},"required":["related","blocked_by","blocking","duplicate"],"type":"object"},"IssueRelationSummary":{"properties":{"blocked_by":{"items":{"$ref":"#/components/schemas/IssueSummary"},"type":"array"},"blocking":{"items":{"$ref":"#/components/schemas/IssueSummary"},"type":"array"},"duplicate":{"items":{"$ref":"#/components/schemas/IssueSummary"},"type":"array"},"related":{"items":{"$ref":"#/components/schemas/IssueSummary"},"type":"array"}},"type":"object"},"IssueSummary":{"properties":{"assignee":{"$ref":"#/components/schemas/User"},"description":{"type":"string"},"id":{"type":"string"},"identifier":{"type":"string"},"priority":{"type":"integer"},"status":{"type":"string"},"status_id":{"type":"string"},"status_info":{"$ref":"#/components/schemas/StatusInfo"},"title":{"type":"string"}},"required":["id","identifier","title"],"type":"object"},"IssueUndo":{"properties":{"expected_version":{"minimum":1,"type":"integer"},"previous":{"$ref":"#/components/schemas/IssueUndoPrevious"}},"required":["expected_version","previous"],"type":"object"},"IssueUndoInput":{"properties":{"expected_version":{"minimum":1,"type":"integer"},"previous":{"$ref":"#/components/schemas/IssueUndoPreviousInput"}},"type":"object"},"IssueUndoPrevious":{"properties":{"assignee_id":{"format":"uuid","type":"string"},"assignee_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"cycle_id":{"format":"uuid","type":"string"},"label_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"priority":{"maximum":4,"minimum":0,"type":"integer"},"project_id":{"format":"uuid","type":"string"},"sort_order":{"type":"number"},"status_id":{"format":"uuid","type":"string"}},"type":"object"},"IssueUndoPreviousInput":{"properties":{"assignee_id":{"format":"uuid","type":["string","null"]},"assignee_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"cycle_id":{"format":"uuid","type":["string","null"]},"label_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"priority":{"maximum":4,"minimum":0,"type":["integer","null"]},"project_id":{"format":"uuid","type":["string","null"]},"sort_order":{"type":["number","null"]},"status_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"Label":{"properties":{"color":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":["string","null"]},"project_id":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","color","description","parent_id","project_id","created_at","updated_at"],"type":"object"},"MoveWikiPageRequest":{"properties":{"index":{"type":"integer"},"parent_id":{"type":["string","null"]}},"type":"object"},"Project":{"properties":{"color":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"icon":{"type":["string","null"]},"id":{"type":"string"},"lead_id":{"type":["string","null"]},"name":{"type":"string"},"progress":{"$ref":"#/components/schemas/ProjectProgress"},"sort_order":{"type":"number"},"start_date":{"format":"date-time","type":["string","null"]},"status":{"type":"string"},"target_date":{"format":"date-time","type":["string","null"]},"team_id":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","description","status","team_id","lead_id","start_date","target_date","sort_order","color","icon","created_at","updated_at"],"type":"object"},"ProjectProgress":{"properties":{"cancelled":{"type":"integer"},"completed":{"type":"integer"},"total":{"type":"integer"}},"required":["total","completed","cancelled"],"type":"object"},"ResolveWikiReferencesRequest":{"properties":{"ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},"SetTeamVisibilityRequest":{"properties":{"acknowledge_privacy_limitations":{"type":"boolean"},"confirm_public":{"type":"boolean"},"is_private":{"type":"boolean"}},"type":"object"},"StatusInfo":{"properties":{"category":{"type":"string"},"color":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer"}},"required":["id","name","category","color","position"],"type":"object"},"StatusResult":{"properties":{"status":{"type":"string"}},"required":["status"],"type":"object"},"Team":{"properties":{"color":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"icon":{"type":["string","null"]},"id":{"type":"string"},"is_private":{"type":"boolean"},"issue_copy_prompt":{"type":["string","null"]},"key":{"type":"string"},"name":{"type":"string"},"parent_auto_close_enabled":{"type":"boolean"},"sub_issue_auto_close_enabled":{"type":"boolean"},"triage_enabled":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"required":["is_private","id","name","key","description","color","icon","triage_enabled","parent_auto_close_enabled","sub_issue_auto_close_enabled","issue_copy_prompt","created_at","updated_at"],"type":"object"},"TeamMember":{"properties":{"created_at":{"format":"date-time","type":"string"},"team_id":{"format":"uuid","type":"string"},"user_id":{"format":"uuid","type":"string"}},"required":["team_id","user_id","created_at"],"type":"object"},"TeamStatus":{"properties":{"category":{"type":"string"},"color":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"is_default":{"type":"boolean"},"name":{"type":"string"},"position":{"type":"integer"},"project_ids":{"items":{"type":"string"},"type":"array"},"slug":{"type":"string"},"team_id":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","team_id","name","slug","category","color","position","is_default","project_ids","created_at","updated_at"],"type":"object"},"UpdateCommentRequest":{"properties":{"body":{"minLength":1,"type":"string"}},"required":["body"],"type":"object"},"UpdateCycleRequest":{"properties":{"description":{"type":["string","null"]},"end_date":{"type":["string","null"]},"goals":{"type":["string","null"]},"name":{"maxLength":100,"minLength":1,"type":["string","null"]},"retrospective":{"type":["string","null"]},"start_date":{"type":["string","null"]},"status":{"enum":["upcoming","active","completed"],"type":["string","null"]}},"type":"object"},"UpdateIssueRequest":{"properties":{"assignee_id":{"format":"uuid","type":["string","null"]},"assignee_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"cycle_id":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"due_date":{"type":["string","null"]},"label_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"parent_id":{"format":"uuid","type":["string","null"]},"priority":{"maximum":4,"minimum":0,"type":["integer","null"]},"project_id":{"format":"uuid","type":["string","null"]},"sort_order":{"type":["number","null"]},"status":{"maxLength":100,"type":["string","null"]},"status_id":{"format":"uuid","type":["string","null"]},"title":{"maxLength":500,"minLength":1,"type":["string","null"]}},"type":"object"},"UpdateLabelRequest":{"properties":{"color":{"pattern":"^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":["string","null"]},"description":{"type":["string","null"]},"name":{"maxLength":50,"minLength":1,"type":["string","null"]}},"type":"object"},"UpdateMemberRoleRequest":{"properties":{"role":{"enum":["owner","admin","member","guest"],"type":"string"}},"required":["role"],"type":"object"},"UpdateProjectRequest":{"properties":{"color":{"maxLength":7,"type":["string","null"]},"description":{"type":["string","null"]},"icon":{"maxLength":50,"type":["string","null"]},"lead_id":{"format":"uuid","type":["string","null"]},"name":{"maxLength":200,"minLength":1,"type":["string","null"]},"sort_order":{"type":["number","null"]},"start_date":{"type":["string","null"]},"status":{"enum":["planned","in_progress","completed","cancelled"],"type":["string","null"]},"target_date":{"type":["string","null"]},"team_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"UpdateTeamRequest":{"properties":{"color":{"type":["string","null"]},"description":{"type":["string","null"]},"icon":{"type":["string","null"]},"issue_copy_prompt":{"maxLength":8000,"type":["string","null"]},"key":{"maxLength":10,"minLength":1,"type":["string","null"]},"name":{"maxLength":100,"minLength":1,"type":["string","null"]},"parent_auto_close_enabled":{"type":["boolean","null"]},"sub_issue_auto_close_enabled":{"type":["boolean","null"]},"triage_enabled":{"type":["boolean","null"]}},"type":"object"},"UpdateTeamStatusRequest":{"properties":{"color":{"type":["string","null"]},"name":{"maxLength":100,"minLength":1,"type":["string","null"]},"position":{"minimum":0,"type":["integer","null"]},"project_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]}},"type":"object"},"UpdateViewRequest":{"properties":{"color":{"type":["string","null"]},"description":{"type":["string","null"]},"filters":{"description":"Any JSON value."},"icon":{"type":["string","null"]},"is_shared":{"type":["boolean","null"]},"name":{"maxLength":100,"minLength":1,"type":["string","null"]}},"type":"object"},"UpdateWebhookRequest":{"properties":{"events":{"items":{"type":"string"},"minItems":1,"type":"array"},"is_active":{"type":["boolean","null"]},"url":{"format":"uri","type":["string","null"]}},"type":"object"},"UpdateWikiPageRequest":{"properties":{"content":{"type":["string","null"]},"title":{"type":["string","null"]},"version":{"minimum":1,"type":"integer"}},"required":["version"],"type":"object"},"User":{"properties":{"avatar_url":{"type":["string","null"]},"display_name":{"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"is_sysadmin":{"type":"boolean"},"name":{"type":"string"},"sso_workspace_slug":{"type":"string"}},"required":["id","email","name","display_name","avatar_url","is_sysadmin","sso_workspace_slug"],"type":"object"},"VelocityPoint":{"properties":{"cancelled":{"type":"integer"},"completed":{"type":"integer"},"cycle_id":{"type":"string"},"cycle_name":{"type":"string"},"cycle_number":{"type":"integer"},"end_date":{"format":"date-time","type":["string","null"]},"scope":{"type":"integer"},"start_date":{"format":"date-time","type":["string","null"]}},"required":["cycle_id","cycle_name","cycle_number","scope","completed","cancelled","start_date","end_date"],"type":"object"},"View":{"properties":{"created_at":{"format":"date-time","type":"string"},"creator_id":{"type":"string"},"description":{"type":["string","null"]},"filters":{"description":"Any JSON value."},"id":{"type":"string"},"is_shared":{"type":"boolean"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"workspace_id":{"type":"string"}},"required":["id","workspace_id","creator_id","name","description","filters","is_shared","created_at","updated_at"],"type":"object"},"Webhook":{"properties":{"created_at":{"format":"date-time","type":"string"},"events":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"is_active":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["id","url","events","is_active","created_at","updated_at"],"type":"object"},"WebhookComment":{"properties":{"agent_task_id":{"format":"uuid","type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"edited_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"issue_id":{"format":"uuid","type":"string"},"parent_id":{"format":"uuid","type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"user_id":{"format":"uuid","type":"string"}},"required":["id","issue_id","user_id","body","parent_id","resolved_at","edited_at","created_at","updated_at"],"type":"object"},"WebhookCommentPayload":{"properties":{"actor_id":{"format":"uuid","type":["string","null"]},"comment":{"$ref":"#/components/schemas/WebhookComment"},"issue":{"$ref":"#/components/schemas/WebhookIssueRef"}},"required":["comment","issue","actor_id"],"type":"object"},"WebhookDelivery":{"properties":{"attempts":{"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"event":{"type":"string"},"id":{"type":"string"},"last_error":{"type":["string","null"]},"last_status_code":{"type":["integer","null"]},"next_attempt_at":{"format":"date-time","type":["string","null"]},"status":{"enum":["pending","delivered","failed"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","event","status","attempts","last_status_code","last_error","next_attempt_at","created_at","updated_at","completed_at"],"type":"object"},"WebhookIssue":{"properties":{"assignee_id":{"format":"uuid","type":["string","null"]},"cancelled_at":{"format":"date-time","type":["string","null"]},"completed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"creator_id":{"format":"uuid","type":"string"},"cycle_id":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"due_date":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"identifier":{"type":"string"},"number":{"type":"integer"},"parent_id":{"format":"uuid","type":["string","null"]},"priority":{"type":"integer"},"project_id":{"format":"uuid","type":["string","null"]},"sort_order":{"type":"number"},"started_at":{"format":"date-time","type":["string","null"]},"status":{"type":"string"},"status_id":{"format":"uuid","type":["string","null"]},"team_id":{"format":"uuid","type":"string"},"title":{"type":"string"},"triaged":{"type":"boolean"},"triaged_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"version":{"type":"integer"},"workspace_id":{"format":"uuid","type":"string"}},"required":["id","workspace_id","team_id","project_id","cycle_id","number","identifier","title","description","status","priority","creator_id","assignee_id","parent_id","due_date","sort_order","status_id","triaged","started_at","completed_at","cancelled_at","triaged_at","created_at","updated_at","version"],"type":"object"},"WebhookIssuePayload":{"properties":{"actor_id":{"format":"uuid","type":["string","null"]},"issue":{"$ref":"#/components/schemas/WebhookIssue"}},"required":["issue","actor_id"],"type":"object"},"WebhookIssueRef":{"properties":{"id":{"format":"uuid","type":"string"},"identifier":{"type":"string"},"team_id":{"format":"uuid","type":"string"}},"required":["id","identifier","team_id"],"type":"object"},"WikiBacklinkIssue":{"properties":{"id":{"type":"string"},"identifier":{"type":"string"},"title":{"type":"string"}},"required":["id","identifier","title"],"type":"object"},"WikiBacklinks":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/WikiBacklinkIssue"},"type":"array"},"pages":{"items":{"$ref":"#/components/schemas/WikiReference"},"type":"array"}},"required":["issues","pages"],"type":"object"},"WikiOverview":{"properties":{"content":{"type":"string"},"generated_at":{"format":"date-time","type":"string"},"generated_by_name":{"type":["string","null"]},"id":{"type":"string"},"period_end":{"type":"string"},"period_start":{"type":"string"},"trigger":{"type":"string"}},"required":["id","period_start","period_end","content","generated_at","generated_by_name","trigger"],"type":"object"},"WikiOverviewList":{"properties":{"next_before":{"type":["string","null"]},"overviews":{"items":{"$ref":"#/components/schemas/WikiOverview"},"type":"array"}},"required":["overviews","next_before"],"type":"object"},"WikiOverviewSchedule":{"properties":{"enabled":{"type":"boolean"},"frequency":{"type":"string"},"period_days":{"type":"integer"},"time":{"type":"string"},"weekday":{"type":"integer"}},"required":["enabled","frequency","weekday","time","period_days"],"type":"object"},"WikiOverviewScheduleInput":{"properties":{"enabled":{"type":"boolean"},"frequency":{"type":"string"},"period_days":{"type":"integer"},"time":{"type":"string"},"weekday":{"type":"integer"}},"type":"object"},"WikiPage":{"properties":{"content":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"type":["string","null"]},"id":{"type":"string"},"project_id":{"type":["string","null"]},"registry_date":{"type":["string","null"]},"team_id":{"type":["string","null"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by":{"type":["string","null"]},"updated_by_name":{"type":["string","null"]},"version":{"type":"integer"}},"required":["id","team_id","project_id","title","version","updated_by","updated_by_name","registry_date","created_at","updated_at","content","created_by"],"type":"object"},"WikiPageSummary":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"project_id":{"type":["string","null"]},"registry_date":{"type":["string","null"]},"team_id":{"type":["string","null"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by":{"type":["string","null"]},"updated_by_name":{"type":["string","null"]},"version":{"type":"integer"}},"required":["id","team_id","project_id","title","version","updated_by","updated_by_name","registry_date","created_at","updated_at"],"type":"object"},"WikiPublication":{"properties":{"children":{"type":"boolean"},"mode":{"type":"string"},"url":{"type":["string","null"]}},"required":["mode","children","url"],"type":"object"},"WikiPublishRequest":{"properties":{"children":{"type":"boolean"},"mode":{"type":"string"},"rotate":{"type":"boolean"}},"type":"object"},"WikiReference":{"properties":{"accessible":{"type":"boolean"},"id":{"type":"string"},"project_id":{"type":"string"},"scope_name":{"type":"string"},"team_id":{"type":"string"},"title":{"type":"string"}},"required":["id","accessible"],"type":"object"},"WikiRegistryDay":{"properties":{"content":{"type":"string"},"date":{"type":"string"},"page_id":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["date","page_id","title","content","version","updated_at"],"type":"object"},"WikiRegistryFeed":{"properties":{"days":{"items":{"$ref":"#/components/schemas/WikiRegistryDay"},"type":"array"},"next_before":{"type":["string","null"]}},"required":["days","next_before"],"type":"object"},"WikiRegistryRequest":{"properties":{"text":{"type":"string"}},"type":"object"},"WikiRevision":{"properties":{"created_at":{"format":"date-time","type":"string"},"edited_by":{"type":["string","null"]},"edited_by_name":{"type":["string","null"]},"id":{"type":"string"},"new_content":{"type":"string"},"new_title":{"type":"string"},"old_content":{"type":"string"},"old_title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","version","old_title","new_title","old_content","new_content","edited_by","edited_by_name","created_at","updated_at"],"type":"object"},"WikiSettings":{"properties":{"overview_last_error":{"type":["string","null"]},"overview_last_run_at":{"format":"date-time","type":["string","null"]},"overview_next_run_at":{"format":"date-time","type":["string","null"]},"overview_schedule":{"$ref":"#/components/schemas/WikiOverviewSchedule"},"overview_timezone":{"type":"string"},"registry_enabled":{"type":"boolean"}},"required":["registry_enabled","overview_schedule","overview_timezone","overview_next_run_at","overview_last_run_at","overview_last_error"],"type":"object"},"WikiSettingsRequest":{"properties":{"overview_schedule":{"anyOf":[{"$ref":"#/components/schemas/WikiOverviewScheduleInput"},{"type":"null"}]},"registry_enabled":{"type":["boolean","null"]}},"type":"object"},"WikiTreeNode":{"properties":{"id":{"type":"string"},"kind":{"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer"}},"required":["id","parent_id","position","kind"],"type":"object"},"Workspace":{"properties":{"created_at":{"format":"date-time","type":"string"},"current_user_role":{"type":"string"},"id":{"type":"string"},"logo_url":{"type":["string","null"]},"name":{"type":"string"},"owner":{"$ref":"#/components/schemas/WorkspaceOwner"},"owner_id":{"type":"string"},"privacy_enabled":{"type":"boolean"},"share_link_min_role":{"type":"string"},"slug":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["privacy_enabled","id","name","slug","logo_url","owner_id","share_link_min_role","current_user_role","created_at","updated_at"],"type":"object"},"WorkspaceMember":{"properties":{"avatar_url":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"user_id":{"type":"string"}},"required":["user_id","email","name","avatar_url","role","created_at"],"type":"object"},"WorkspaceOwner":{"properties":{"avatar_url":{"type":["string","null"]},"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","email","name","avatar_url"],"type":"object"}},"securitySchemes":{"personalAccessToken":{"bearerFormat":"kuayle_pat_<40 characters>","description":"A personal access token created under Settings, API Tokens. The names listed with an operation are the token scopes it needs.","scheme":"bearer","type":"http"}}},"info":{"description":"The public HTTP API of Kuayle, the open-source issue tracker. It covers issues, comments, teams, statuses, cycles, projects, labels, views, wikis, members and webhooks, for use with personal access tokens.\n\n## Authentication\n\nEvery request is authenticated with a personal access token. Create one in the app under Settings, API Tokens: choose its scopes, optionally limit it to some workspaces and give it an expiry date. The token is shown once and stored only as a hash.\n\nSend the token in the Authorization header as \"Bearer kuayle_pat_...\". Use HTTPS; a token grants access until it expires or is revoked.\n\nA token acts as the user who created it and never has more access than that user. Creating, listing and revoking tokens needs a signed-in browser session and is not possible with a token.\n\n```sh\ncurl -H \"Authorization: Bearer $KUAYLE_TOKEN\" \\\n  https://kuayle.example.com/api/workspaces\n```\n\n## Token scopes\n\nEach operation names the scope it needs. A request passes when the token has that scope and the user's workspace role grants the same permission: scopes are a ceiling on the role, not an addition to it. Guests, for example, only read, whatever scopes their token carries.\n\nA request without the needed scope or permission gets 403 FORBIDDEN. Private teams stay invisible to non-members: their issues, projects, cycles and wiki pages answer 404 or are left out of lists.\n\nScopes used by this reference:\n\n- account:read\n- comments:read\n- cycle:manage\n- cycles:read\n- issue:create\n- issue:delete\n- issue:delete_own\n- issue:update\n- issues:read\n- label:manage\n- labels:read\n- member:invite\n- members:read\n- project:manage\n- projects:read\n- team:manage\n- teams:read\n- view:manage\n- views:read\n- wiki:read\n- wiki:write\n- workspace:manage\n- workspaces:read\n\n## Pagination\n\nThe issue list is paginated with the page and per_page query parameters (per_page defaults to 50 and should not exceed 100). The response wraps the items in data and adds total_count, page, per_page and has_more; request the next page while has_more is true.\n\nThe wiki registry and its overviews use a cursor: pass the next_before value of one response as before in the next request, and stop when next_before is null.\n\nEvery other list returns all items the user can see in one JSON array.\n\n## Errors\n\nErrors use the HTTP status and one JSON shape: an error object with a machine-readable code, a message for people, and for validation errors a details array naming each field.\n\n- 400 BAD_REQUEST: malformed JSON, an invalid ID, or a rule the request breaks; the message says which\n- 400 VALIDATION_ERROR: one or more fields are invalid; see details\n- 401 UNAUTHORIZED: the token is missing, unknown, expired or revoked\n- 403 FORBIDDEN: the token's scopes, workspace limit or the user's role do not allow the request\n- 404 NOT_FOUND: the resource does not exist or the user cannot see it\n- 409 with a specific code such as CONFLICT or WIKI_VERSION_CONFLICT: the request conflicts with the current state\n- 429 RATE_LIMITED: too many requests; wait for the number of seconds in the Retry-After header\n- 500 INTERNAL_ERROR: the server failed; the request can be retried\n\n```json\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Request validation failed\",\n    \"details\": [{ \"field\": \"Title\", \"message\": \"Title is required\" }]\n  }\n}\n```\n\n## Rate limits\n\nKuayle does not apply a request quota to authenticated API calls. Unauthenticated endpoints are limited per IP address: sign-in endpoints refill 5 requests per second with a burst of 10, and this document refills 10 per second with a burst of 20. A limited request gets 429 RATE_LIMITED with a Retry-After header.\n\nThe operator of an instance can add limits at the reverse proxy, so treat 429 as retryable everywhere: wait for Retry-After, then retry. Keep bulk jobs sequential or at low concurrency; the instance is shared with the people using the app.\n\n## Webhooks and signature verification\n\nA webhook is a URL of yours registered for a workspace with a secret and a list of event names. The URL must be reachable from the instance and must not be a private, loopback or link-local address. The secret is stored encrypted and never returned.\n\nA delivery is an HTTP POST with a JSON body holding event, payload and timestamp (RFC 3339, UTC). The X-Webhook-Event header repeats the event name. The X-Webhook-Signature header is \"sha256=\" followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's secret. The X-Webhook-Delivery header is the delivery's id, the same in every attempt.\n\nTo verify a delivery, compute the same HMAC over the bytes you received, before parsing them, and compare it with the header in constant time. Reject the request when they differ. Deliveries time out after 10 seconds, so answer with a 2xx status quickly and do slow work afterwards.\n\nDeliveries are sent after the change is saved: one per webhook subscribed to the event, and one per issue for bulk operations (bulk edits and deletes, unfinished issues moved to the next cycle). The issue in an issue event is the stored issue: its ids, identifier, title, description, status, priority, dates and timestamps, including started_at, completed_at, cancelled_at and triaged_at. actor_id is the user whose change caused the event, also for a follow-up Kuayle makes for them, such as closing a parent whose sub-issues are all done. It is null only for system automation: status transitions from forge and GitHub activity.\n\nDelivery is at least once. Each change is stored when it is saved, one delivery per webhook, and survives restarts and updates of the instance; a delivery interrupted by a restart is sent again. A timeout, a network error or a status other than 2xx fails the attempt, and the delivery is retried with the same body, signature and X-Webhook-Delivery after 30 seconds, 2 minutes, 10 minutes, 30 minutes and 2 hours. After the sixth failed attempt, or once it has waited a day, it is given up. Use X-Webhook-Delivery to ignore a delivery you already handled. Each workspace has one delivery in flight at a time, workspaces take turns, and each workspace may hold at most 1024 pending deliveries and 8 MiB of payloads, and each webhook 256 deliveries, so a busy workspace or a dead receiver does not crowd out others; a delivery beyond these bounds is dropped. The webhook's delivery log (GET .../webhooks/{id}/deliveries) shows recent deliveries with their status, attempts, last status and error, and next attempt.\n\nA webhook whose deliveries fail three times in a row is paused for five minutes: its deliveries wait while the workspace's other webhooks keep receiving theirs. After the pause the earliest due delivery is attempted; a success resumes the webhook and a failure pauses it again. A first attempt goes out in the order the changes were saved, but a retry arrives after later deliveries: do not rely on order. Compare payload.issue.updated_at (the envelope timestamp has one-second resolution), or fetch the issue again for its current state.\n\nWebhooks are workspace-level and have no user, so they never deliver content of private teams: a workspace that has, or ever had, a private team does not deliver webhooks at all, creating or enabling a webhook there is refused with 403 PRIVATE_WORKSPACE_OPERATION_DISABLED, and a stored delivery is checked again when it is sent. Changes the database makes by itself send no event: deleting a parent detaches its sub-issues, deleting a project or cycle clears it from its issues, deleting a team deletes its issues and renaming a team key changes identifiers. A workspace import sends none either. Kuayle delivers these events:\n\n- issue.created: An issue was created, including sub-issues and duplicates. A workspace import does not send it.\n- issue.updated: An issue changed: a field, its status, assignees, labels, project, parent or cycle, including bulk edits, unfinished issues moved to the next cycle and automation. A bulk operation sends one delivery per issue. Changes the database makes by itself, such as clearing a deleted project, cycle or parent, send none.\n- issue.deleted: An issue was deleted. The payload holds the issue as it was when it was deleted. A bulk delete sends one delivery per issue; issues deleted with their team send none.\n- issue.triaged: An issue was accepted or declined from triage. Declining also moves it to cancelled: that is part of this event, not a separate issue.updated.\n- comment.created: A comment was posted on an issue. The payload holds the comment and the issue's id, identifier and team_id.\n- comment.updated: A comment was resolved, reopened or edited by its author. The payload is that of comment.created, with the comment as stored after the change; an edit sets edited_at. Resolving a resolved comment, reopening an open one or saving an unchanged body sends nothing.\n- comment.deleted: A comment was deleted by a workspace admin or owner. The payload is that of comment.created, with the comment as it was when it was deleted; its replies are hidden with it and send no deliveries of their own. Restoring the comment within the grace period sends no event.\n\n```js\nimport { createHmac, timingSafeEqual } from 'node:crypto';\n\n// rawBody: the request body bytes exactly as received, before any JSON parsing.\nexport function isFromKuayle(rawBody, signatureHeader, secret) {\n  const expected = 'sha256=' + createHmac('sha256', secret).update(rawBody).digest('hex');\n  const received = Buffer.from(signatureHeader ?? '');\n  return received.length === expected.length && timingSafeEqual(received, Buffer.from(expected));\n}\n```\n\n## Stability and versions\n\nThis document lists the stable operations. Its version is the Kuayle release it was built from, and each instance serves the document for its own release at /api/openapi.json. Changes to a stable operation ship with a release and are listed in its notes.\n\nRoutes of the app that are not listed here are internal: they serve the web app, the dev machines or integration setup, may change in any release, and most reject tokens.\n","license":{"identifier":"Apache-2.0","name":"Apache 2.0"},"summary":"Issues, comments, teams, projects, cycles, labels, views, wikis and webhooks over HTTP.","title":"Kuayle API","version":"0.2.40"},"openapi":"3.1.0","paths":{"/api/auth/me":{"get":{"description":"Returns the user who owns the token. Use it to check that a token works.\n\nRequired scope: `account:read`.","operationId":"getCurrentUser","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["account:read"]}],"summary":"Get the token's user","tags":["Account"],"x-kuayle-scopes":["account:read"],"x-kuayle-stability":"stable"}},"/api/workspaces":{"get":{"description":"Lists the workspaces the user belongs to. A token limited to some workspaces lists only those.\n\nRequired scope: `workspaces:read`.","operationId":"listWorkspaces","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Workspace"},"type":"array"}}},"description":"Success."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["workspaces:read"]}],"summary":"List workspaces","tags":["Workspaces"],"x-kuayle-scopes":["workspaces:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}":{"get":{"description":"Required scope: `workspaces:read`.","operationId":"getWorkspace","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["workspaces:read"]}],"summary":"Get a workspace","tags":["Workspaces"],"x-kuayle-scopes":["workspaces:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/invite":{"post":{"description":"Adds a registered user by email with the given role.\n\nRequired scope: `member:invite`.","operationId":"inviteMember","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["member:invite"]}],"summary":"Add an existing user to the workspace","tags":["Members"],"x-kuayle-scopes":["member:invite"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues":{"get":{"description":"Returns one page of the issues the user can see, with filters and sorting. See Pagination.\n\nRequired scope: `issues:read`.","operationId":"listIssues","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Page number, starting at 1.","in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"description":"Items per page. Defaults to 50.","in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}},{"description":"Comma-separated legacy status names or status IDs.","in":"query","name":"status","schema":{"type":"string"}},{"description":"Status category: backlog, unstarted, started, completed or cancelled.","in":"query","name":"status_type","schema":{"type":"string"}},{"description":"Comma-separated priorities, 0 (none) to 4.","in":"query","name":"priority","schema":{"type":"string"}},{"description":"User ID or agent ID, or \"none\" for issues assigned to nobody.","in":"query","name":"assignee","schema":{"type":"string"}},{"description":"User ID of the creator.","in":"query","name":"creator","schema":{"type":"string"}},{"description":"User ID: issues with an AI agent that this user assigned.","in":"query","name":"agent_assigned_by","schema":{"type":"string"}},{"description":"Team ID.","in":"query","name":"team","schema":{"type":"string"}},{"description":"Project ID, or \"none\" for issues without a project.","in":"query","name":"project","schema":{"type":"string"}},{"description":"Cycle ID, or \"none\" for issues without a cycle.","in":"query","name":"cycle","schema":{"type":"string"}},{"description":"Label ID, or \"none\" for issues without labels.","in":"query","name":"label","schema":{"type":"string"}},{"description":"Text matched against the issue title and identifier and the team name, key and description.","in":"query","name":"search","schema":{"type":"string"}},{"description":"Only issues due on or before this date (YYYY-MM-DD).","in":"query","name":"due_before","schema":{"type":"string"}},{"description":"Only issues due on or after this date (YYYY-MM-DD).","in":"query","name":"due_after","schema":{"type":"string"}},{"description":"\"false\" for issues waiting in triage, any other value for triaged issues.","in":"query","name":"triaged","schema":{"type":"string"}},{"description":"\"exclude\" or \"top_level\" for issues without a parent, \"only\" for sub-issues, \"has_sub_issues\" for parents.","in":"query","name":"sub_issues","schema":{"type":"string"}},{"description":"Parent issue ID, or \"none\" for issues without a parent.","in":"query","name":"parent_id","schema":{"type":"string"}},{"description":"Orders the result so that issues of one group are adjacent.","in":"query","name":"group_by","schema":{"enum":["status","priority","assignee","project"],"type":"string"}},{"description":"Sort field. Defaults to created_at.","in":"query","name":"sort","schema":{"enum":["created_at","updated_at","priority","sort_order","status","due_date"],"type":"string"}},{"description":"Sort direction.","in":"query","name":"order","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"With group_by=status, a comma-separated order of status categories.","in":"query","name":"status_category_order","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueList"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issues:read"]}],"summary":"List issues","tags":["Issues"],"x-kuayle-scopes":["issues:read"],"x-kuayle-stability":"stable"},"post":{"description":"Creates an issue in a team. The description is Markdown or editor HTML and is sanitized. In a team with triage enabled the issue waits in triage.\n\nRequired scope: `issue:create`.","operationId":"createIssue","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:create"]}],"summary":"Create an issue","tags":["Issues"],"x-kuayle-scopes":["issue:create"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/bulk":{"delete":{"description":"Members delete only issues they created; owners and admins delete any.\n\nRequired scope: `issue:delete_own`.","operationId":"bulkDeleteIssues","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteIssueRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteIssue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:delete_own"]}],"summary":"Delete several issues","tags":["Issues"],"x-kuayle-scopes":["issue:delete_own"],"x-kuayle-stability":"stable"},"patch":{"description":"The response carries an undo for POST /issues/bulk/undo when the change can be undone (all fields but parent_id).\n\nRequired scope: `issue:update`.","operationId":"bulkUpdateIssues","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateIssueRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateIssue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Update several issues","tags":["Issues"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/bulk/restore":{"post":{"description":"Members restore only issues they created; owners and admins restore any. A deleted issue can be restored until its grace period ends (ISSUE_DELETE_GRACE_PERIOD, 30 days by default); after that the response is 410 GRACE_EXPIRED, and once purged the issue is not found.\n\nRequired scope: `issue:delete_own`.","operationId":"bulkRestoreIssues","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRestoreIssueRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRestoreIssue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:delete_own"]}],"summary":"Restore several deleted issues","tags":["Issues"],"x-kuayle-scopes":["issue:delete_own"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/bulk/undo":{"post":{"description":"Sends back the undo of a bulk update response. Applies to every issue or none: if any issue changed since (its version differs), nothing is undone.\n\nRequired scope: `issue:update`.","operationId":"bulkUndoIssues","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIssueUndoInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUndoIssue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The issue was edited in the meantime (EDITED_MEANWHILE), or a previous value is no longer available (UNDO_UNAVAILABLE); nothing was undone."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Undo a bulk update","tags":["Issues"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}":{"delete":{"description":"Members delete only issues they created; owners and admins delete any. The issue can be restored until restorable_until.\n\nRequired scope: `issue:delete_own`.","operationId":"deleteIssue","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteIssue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:delete_own"]}],"summary":"Delete an issue","tags":["Issues"],"x-kuayle-scopes":["issue:delete_own"],"x-kuayle-stability":"stable"},"get":{"description":"Required scope: `issues:read`.","operationId":"getIssue","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issues:read"]}],"summary":"Get an issue","tags":["Issues"],"x-kuayle-scopes":["issues:read"],"x-kuayle-stability":"stable"},"patch":{"description":"Changes the fields that are present.\n\nRequired scope: `issue:update`.","operationId":"updateIssue","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIssueRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Update an issue","tags":["Issues"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/comments":{"get":{"description":"Returns top-level comments, each with its replies.\n\nRequired scope: `comments:read`.","operationId":"listIssueComments","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Comment"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["comments:read"]}],"summary":"List an issue's comments","tags":["Comments"],"x-kuayle-scopes":["comments:read"],"x-kuayle-stability":"stable"},"post":{"description":"The body is Markdown or editor HTML and is sanitized. Set parent_id to reply to a comment.\n\nRequired scope: `issue:create`.","operationId":"createIssueComment","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:create"]}],"summary":"Add a comment to an issue","tags":["Comments"],"x-kuayle-scopes":["issue:create"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/comments/{commentId}":{"delete":{"description":"Workspace admins and owners only. The comment and its replies are hidden and stay restorable until restorable_until, the same grace period as deleted issues. Sends comment.deleted.\n\nRequired scope: `issue:delete`.","operationId":"deleteIssueComment","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}},{"description":"Comment ID.","in":"path","name":"commentId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteComment"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:delete"]}],"summary":"Delete a comment","tags":["Comments"],"x-kuayle-scopes":["issue:delete"],"x-kuayle-stability":"stable"},"patch":{"description":"Only the comment's author can edit it; anyone else, admins included, gets 403. The body is Markdown or editor HTML and is sanitized. A changed body sets edited_at and sends comment.updated.\n\nRequired scope: `issue:create`.","operationId":"updateIssueComment","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}},{"description":"Comment ID.","in":"path","name":"commentId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:create"]}],"summary":"Edit a comment","tags":["Comments"],"x-kuayle-scopes":["issue:create"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/comments/{commentId}/reopen":{"post":{"description":"Required scope: `issue:update`.","operationId":"reopenIssueComment","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}},{"description":"Comment ID.","in":"path","name":"commentId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Reopen a comment thread","tags":["Comments"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/comments/{commentId}/resolve":{"post":{"description":"Required scope: `issue:update`.","operationId":"resolveIssueComment","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}},{"description":"Comment ID.","in":"path","name":"commentId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Resolve a comment thread","tags":["Comments"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/comments/{commentId}/restore":{"post":{"description":"Workspace admins and owners only. Brings back a comment deleted within the grace period, with its replies; past it the response is 410 GRACE_EXPIRED. Sends no webhook.\n\nRequired scope: `issue:delete`.","operationId":"restoreIssueComment","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}},{"description":"Comment ID.","in":"path","name":"commentId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:delete"]}],"summary":"Restore a deleted comment","tags":["Comments"],"x-kuayle-scopes":["issue:delete"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/convert-to-project":{"post":{"description":"Required scope: `project:manage`.","operationId":"convertIssueToProject","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertIssueToProject"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["project:manage"]}],"summary":"Convert an issue to a project","tags":["Issues"],"x-kuayle-scopes":["project:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/duplicate":{"post":{"description":"Required scope: `issue:create`.","operationId":"duplicateIssue","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateIssueRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:create"]}],"summary":"Duplicate an issue","tags":["Issues"],"x-kuayle-scopes":["issue:create"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/history":{"get":{"description":"Required scope: `issues:read`.","operationId":"getIssueHistory","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IssueHistory"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issues:read"]}],"summary":"Get an issue's change history","tags":["Issues"],"x-kuayle-scopes":["issues:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/relations":{"get":{"description":"Required scope: `issues:read`.","operationId":"listIssueRelations","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IssueRelation"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issues:read"]}],"summary":"List an issue's relations","tags":["Issue relations"],"x-kuayle-scopes":["issues:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `issue:update`.","operationId":"createIssueRelation","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueRelationRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueRelation"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Relate two issues","tags":["Issue relations"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/relations/{relationId}":{"delete":{"description":"Required scope: `issue:update`.","operationId":"deleteIssueRelation","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}},{"description":"Relation ID.","in":"path","name":"relationId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Remove a relation","tags":["Issue relations"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/restore":{"post":{"description":"Members restore only issues they created; owners and admins restore any. A deleted issue can be restored until its grace period ends (ISSUE_DELETE_GRACE_PERIOD, 30 days by default); after that the response is 410 GRACE_EXPIRED, and once purged the issue is not found.\n\nRequired scope: `issue:delete_own`.","operationId":"restoreIssue","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:delete_own"]}],"summary":"Restore a deleted issue","tags":["Issues"],"x-kuayle-scopes":["issue:delete_own"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/sub-issues":{"get":{"description":"Required scope: `issues:read`.","operationId":"listSubIssues","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issues:read"]}],"summary":"List an issue's sub-issues","tags":["Issues"],"x-kuayle-scopes":["issues:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `issue:create`.","operationId":"createSubIssue","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubIssueRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:create"]}],"summary":"Create a sub-issue","tags":["Issues"],"x-kuayle-scopes":["issue:create"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/sub-issues/bulk":{"post":{"description":"Required scope: `issue:create`.","operationId":"bulkCreateSubIssues","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateSubIssueRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:create"]}],"summary":"Create several sub-issues","tags":["Issues"],"x-kuayle-scopes":["issue:create"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/triage/accept":{"post":{"description":"Required scope: `issue:update`.","operationId":"acceptIssueTriage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Accept an issue from triage","tags":["Issues"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/triage/decline":{"post":{"description":"Required scope: `issue:update`.","operationId":"declineIssueTriage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Decline an issue in triage","tags":["Issues"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/undo":{"post":{"description":"Sends back the undo of an update response to put the previous values back. If the issue changed since (its version differs), nothing is undone.\n\nRequired scope: `issue:update`.","operationId":"undoIssueUpdate","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueUndoInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The issue was edited in the meantime (EDITED_MEANWHILE), or a previous value is no longer available (UNDO_UNAVAILABLE); nothing was undone."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Undo an issue update","tags":["Issues"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/wiki-references":{"get":{"description":"Pages the caller cannot see are returned with accessible false and no title.\n\nRequired scope: `issues:read` and `wiki:read`.","operationId":"listIssueWikiReferences","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiReference"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issues:read","wiki:read"]}],"summary":"List the wiki pages attached to an issue","tags":["Wiki"],"x-kuayle-scopes":["issues:read","wiki:read"],"x-kuayle-stability":"stable"},"post":{"description":"Returns the issue's attached pages.\n\nRequired scope: `issue:update` and `wiki:read`.","operationId":"attachIssueWikiReference","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachWikiReferenceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiReference"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update","wiki:read"]}],"summary":"Attach a wiki page to an issue","tags":["Wiki"],"x-kuayle-scopes":["issue:update","wiki:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/issues/{identifier}/wiki-references/{pageId}":{"delete":{"description":"Required scope: `issue:update`.","operationId":"detachIssueWikiReference","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Issue identifier: the team key and issue number, for example ENG-42.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["issue:update"]}],"summary":"Remove a wiki page from an issue","tags":["Wiki"],"x-kuayle-scopes":["issue:update"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/labels":{"get":{"description":"Required scope: `labels:read`.","operationId":"listLabels","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Return workspace labels and the labels of this project only.","in":"query","name":"project_id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Label"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["labels:read"]}],"summary":"List labels","tags":["Labels"],"x-kuayle-scopes":["labels:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `label:manage`.","operationId":"createLabel","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLabelRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A label with this name already exists in the same place."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["label:manage"]}],"summary":"Create a label","tags":["Labels"],"x-kuayle-scopes":["label:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/labels/{id}":{"delete":{"description":"Required scope: `label:manage`.","operationId":"deleteLabel","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["label:manage"]}],"summary":"Delete a label","tags":["Labels"],"x-kuayle-scopes":["label:manage"],"x-kuayle-stability":"stable"},"patch":{"description":"Required scope: `label:manage`.","operationId":"updateLabel","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLabelRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A label with this name already exists in the same place."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["label:manage"]}],"summary":"Update a label","tags":["Labels"],"x-kuayle-scopes":["label:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/members":{"get":{"description":"Required scope: `members:read`.","operationId":"listMembers","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkspaceMember"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["members:read"]}],"summary":"List workspace members","tags":["Members"],"x-kuayle-scopes":["members:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/members/{userId}":{"delete":{"description":"Required scope: `member:invite`.","operationId":"removeMember","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"User ID.","in":"path","name":"userId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["member:invite"]}],"summary":"Remove a member from the workspace","tags":["Members"],"x-kuayle-scopes":["member:invite"],"x-kuayle-stability":"stable"},"patch":{"description":"Required scope: `member:invite`.","operationId":"updateMemberRole","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"User ID.","in":"path","name":"userId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["member:invite"]}],"summary":"Change a member's role","tags":["Members"],"x-kuayle-scopes":["member:invite"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects":{"get":{"description":"Each project carries its progress counts.\n\nRequired scope: `projects:read`.","operationId":"listProjects","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Project"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["projects:read"]}],"summary":"List projects","tags":["Projects"],"x-kuayle-scopes":["projects:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `project:manage`.","operationId":"createProject","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["project:manage"]}],"summary":"Create a project","tags":["Projects"],"x-kuayle-scopes":["project:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}":{"delete":{"description":"Required scope: `project:manage`.","operationId":"deleteProject","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["project:manage"]}],"summary":"Delete a project","tags":["Projects"],"x-kuayle-scopes":["project:manage"],"x-kuayle-stability":"stable"},"get":{"description":"Required scope: `projects:read`.","operationId":"getProject","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["projects:read"]}],"summary":"Get a project","tags":["Projects"],"x-kuayle-scopes":["projects:read"],"x-kuayle-stability":"stable"},"patch":{"description":"Required scope: `project:manage`.","operationId":"updateProject","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["project:manage"]}],"summary":"Update a project","tags":["Projects"],"x-kuayle-scopes":["project:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki":{"get":{"description":"Pages are returned without their content. With search, only pages whose title or text contains it.\n\nRequired scope: `wiki:read`.","operationId":"listProjectWikiPages","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Text to find in the title or the text of a page, ignoring case.","in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiPageSummary"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"List the pages of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"post":{"description":"Content is Markdown or editor HTML and is sanitized.\n\nRequired scope: `wiki:write`.","operationId":"createProjectWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWikiPageRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Create a page in a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/registry":{"get":{"description":"The registry is a dated log, one page per UTC day, newest first.\n\nRequired scope: `wiki:read`.","operationId":"getProjectWikiRegistry","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Return entries older than this value; pass next_before from the previous response.","in":"query","name":"before","schema":{"format":"date","type":"string"}},{"description":"Days to return, 1 to 31. Defaults to 7.","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiRegistryFeed"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Read the registry of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `wiki:write`.","operationId":"appendProjectWikiRegistry","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiRegistryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The registry of this wiki is turned off."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Add an entry to today's registry page of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/registry/overviews":{"get":{"description":"Required scope: `wiki:read`.","operationId":"listProjectWikiOverviews","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Return entries older than this value; pass next_before from the previous response.","in":"query","name":"before","schema":{"format":"date-time","type":"string"}},{"description":"Overviews to return, 1 to 50. Defaults to 10.","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiOverviewList"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"List the registry overviews of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/settings":{"get":{"description":"Required scope: `wiki:read`.","operationId":"getProjectWikiSettings","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiSettings"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Get the settings of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"patch":{"description":"Required scope: `wiki:write`.","operationId":"updateProjectWikiSettings","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiSettingsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiSettings"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Update the settings of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/tree":{"get":{"description":"Lists each page's parent, position and kind (page or folder).\n\nRequired scope: `wiki:read`.","operationId":"getProjectWikiTree","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiTreeNode"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Get the page tree of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `wiki:write`.","operationId":"createProjectWikiTreePage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWikiTreePageRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Create a page or folder under a parent in a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/{pageId}":{"delete":{"description":"Its child pages move up to its parent. The page can be restored until restorable_until.\n\nRequired scope: `wiki:write`.","operationId":"deleteProjectWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Delete a page of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"},"get":{"description":"Required scope: `wiki:read`.","operationId":"getProjectWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Get a page of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"patch":{"description":"Send the version you read; a stale version is rejected so concurrent edits are not lost.\n\nRequired scope: `wiki:write`.","operationId":"updateProjectWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWikiPageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The page changed since the given version. Read it again before saving."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Update a page of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/{pageId}/backlinks":{"get":{"description":"Issues that mention the page in their description or a comment or have it attached, and pages that mention it, limited to what the caller can see. The issues are listed only with issues:read.\n\nRequired scope: `wiki:read`.","operationId":"listProjectWikiPageBacklinks","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiBacklinks"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"List where a project wiki page is referenced","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/{pageId}/move":{"post":{"description":"Returns the new tree.\n\nRequired scope: `wiki:write`.","operationId":"moveProjectWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveWikiPageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiTreeNode"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Move a page within a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/{pageId}/publish":{"get":{"description":"Required scope: `wiki:read`.","operationId":"getProjectWikiPagePublication","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPublication"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Get how a project wiki page is published","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"put":{"description":"Mode is off, internal or public. Only roles allowed by the workspace may publish publicly.\n\nRequired scope: `wiki:write`.","operationId":"publishProjectWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPublishRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPublication"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Pages of a private team cannot be published publicly."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Publish or unpublish a project wiki page","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/{pageId}/restore":{"post":{"description":"Within the grace period (ISSUE_DELETE_GRACE_PERIOD, 30 days by default) the page comes back under its parent, or at the top level if the parent is gone; after it the response is 410 GRACE_EXPIRED.\n\nRequired scope: `wiki:write`.","operationId":"restoreProjectWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Restore a deleted page of a project wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/projects/{id}/wiki/{pageId}/versions":{"get":{"description":"Required scope: `wiki:read`.","operationId":"listProjectWikiPageVersions","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiRevision"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"List the earlier versions of a project wiki page","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams":{"get":{"description":"Lists the teams the user can see. Private teams appear only for their members, owners and admins.\n\nRequired scope: `teams:read`.","operationId":"listTeams","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Team"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["teams:read"]}],"summary":"List teams","tags":["Teams"],"x-kuayle-scopes":["teams:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `team:manage`.","operationId":"createTeam","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A team with this key already exists."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["team:manage"]}],"summary":"Create a team","tags":["Teams"],"x-kuayle-scopes":["team:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}":{"delete":{"description":"Required scope: `team:manage`.","operationId":"deleteTeam","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["team:manage"]}],"summary":"Delete a team","tags":["Teams"],"x-kuayle-scopes":["team:manage"],"x-kuayle-stability":"stable"},"get":{"description":"Required scope: `teams:read`.","operationId":"getTeam","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["teams:read"]}],"summary":"Get a team","tags":["Teams"],"x-kuayle-scopes":["teams:read"],"x-kuayle-stability":"stable"},"patch":{"description":"Required scope: `team:manage`.","operationId":"updateTeam","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A team with this key already exists."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["team:manage"]}],"summary":"Update a team","tags":["Teams"],"x-kuayle-scopes":["team:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/cycles":{"get":{"description":"Each cycle carries its progress counts.\n\nRequired scope: `cycles:read`.","operationId":"listCycles","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Cycle"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["cycles:read"]}],"summary":"List a team's cycles","tags":["Cycles"],"x-kuayle-scopes":["cycles:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `cycle:manage`.","operationId":"createCycle","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCycleRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cycle"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["cycle:manage"]}],"summary":"Create a cycle","tags":["Cycles"],"x-kuayle-scopes":["cycle:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/cycles/velocity":{"get":{"description":"Required scope: `cycles:read`.","operationId":"getCycleVelocity","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VelocityPoint"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["cycles:read"]}],"summary":"Get velocity across a team's cycles","tags":["Cycles"],"x-kuayle-scopes":["cycles:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/cycles/{cycleId}":{"delete":{"description":"Required scope: `cycle:manage`.","operationId":"deleteCycle","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cycle ID.","in":"path","name":"cycleId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["cycle:manage"]}],"summary":"Delete a cycle","tags":["Cycles"],"x-kuayle-scopes":["cycle:manage"],"x-kuayle-stability":"stable"},"get":{"description":"Required scope: `cycles:read`.","operationId":"getCycle","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cycle ID.","in":"path","name":"cycleId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cycle"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["cycles:read"]}],"summary":"Get a cycle","tags":["Cycles"],"x-kuayle-scopes":["cycles:read"],"x-kuayle-stability":"stable"},"patch":{"description":"Required scope: `cycle:manage`.","operationId":"updateCycle","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cycle ID.","in":"path","name":"cycleId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCycleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cycle"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["cycle:manage"]}],"summary":"Update a cycle","tags":["Cycles"],"x-kuayle-scopes":["cycle:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/cycles/{cycleId}/burndown":{"get":{"description":"Required scope: `cycles:read`.","operationId":"getCycleBurndown","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cycle ID.","in":"path","name":"cycleId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BurndownPoint"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["cycles:read"]}],"summary":"Get a cycle's burndown","tags":["Cycles"],"x-kuayle-scopes":["cycles:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/cycles/{cycleId}/complete":{"post":{"description":"Optionally carries unfinished issues over to the next upcoming cycle.\n\nRequired scope: `cycle:manage`.","operationId":"completeCycle","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cycle ID.","in":"path","name":"cycleId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteCycleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteCycleResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["cycle:manage"]}],"summary":"Complete a cycle","tags":["Cycles"],"x-kuayle-scopes":["cycle:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/members":{"get":{"description":"Required scope: `members:read` and `teams:read`.","operationId":"listTeamMembers","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeamMember"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["members:read","teams:read"]}],"summary":"List team members","tags":["Teams"],"x-kuayle-scopes":["members:read","teams:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `team:manage`.","operationId":"addTeamMember","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTeamMemberRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["team:manage"]}],"summary":"Add a workspace member to a team","tags":["Teams"],"x-kuayle-scopes":["team:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/members/{userId}":{"delete":{"description":"Required scope: `team:manage`.","operationId":"removeTeamMember","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"User ID.","in":"path","name":"userId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["team:manage"]}],"summary":"Remove a member from a team","tags":["Teams"],"x-kuayle-scopes":["team:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/projects":{"get":{"description":"Required scope: `projects:read`.","operationId":"listTeamProjects","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Project"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["projects:read"]}],"summary":"List a team's projects","tags":["Projects"],"x-kuayle-scopes":["projects:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/statuses":{"get":{"description":"Statuses are the team's workflow, ordered by position. Use a status ID as status_id when writing issues.\n\nRequired scope: `teams:read`.","operationId":"listStatuses","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeamStatus"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["teams:read"]}],"summary":"List a team's statuses","tags":["Statuses"],"x-kuayle-scopes":["teams:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `team:manage`.","operationId":"createStatus","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamStatusRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamStatus"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["team:manage"]}],"summary":"Create a status","tags":["Statuses"],"x-kuayle-scopes":["team:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/statuses/{statusId}":{"delete":{"description":"Required scope: `team:manage`.","operationId":"deleteStatus","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Status ID.","in":"path","name":"statusId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["team:manage"]}],"summary":"Delete a status","tags":["Statuses"],"x-kuayle-scopes":["team:manage"],"x-kuayle-stability":"stable"},"patch":{"description":"Required scope: `team:manage`.","operationId":"updateStatus","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Status ID.","in":"path","name":"statusId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamStatusRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamStatus"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["team:manage"]}],"summary":"Update a status","tags":["Statuses"],"x-kuayle-scopes":["team:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/visibility":{"patch":{"description":"Required scope: `team:manage`.","operationId":"setTeamVisibility","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTeamVisibilityRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The change conflicts with existing private-team data."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["team:manage"]}],"summary":"Make a team private or public","tags":["Teams"],"x-kuayle-scopes":["team:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki":{"get":{"description":"Pages are returned without their content. With search, only pages whose title or text contains it.\n\nRequired scope: `wiki:read`.","operationId":"listTeamWikiPages","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Text to find in the title or the text of a page, ignoring case.","in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiPageSummary"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"List the pages of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"post":{"description":"Content is Markdown or editor HTML and is sanitized.\n\nRequired scope: `wiki:write`.","operationId":"createTeamWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWikiPageRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Create a page in a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/registry":{"get":{"description":"The registry is a dated log, one page per UTC day, newest first.\n\nRequired scope: `wiki:read`.","operationId":"getTeamWikiRegistry","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Return entries older than this value; pass next_before from the previous response.","in":"query","name":"before","schema":{"format":"date","type":"string"}},{"description":"Days to return, 1 to 31. Defaults to 7.","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiRegistryFeed"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Read the registry of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `wiki:write`.","operationId":"appendTeamWikiRegistry","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiRegistryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The registry of this wiki is turned off."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Add an entry to today's registry page of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/registry/overviews":{"get":{"description":"Required scope: `wiki:read`.","operationId":"listTeamWikiOverviews","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Return entries older than this value; pass next_before from the previous response.","in":"query","name":"before","schema":{"format":"date-time","type":"string"}},{"description":"Overviews to return, 1 to 50. Defaults to 10.","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiOverviewList"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"List the registry overviews of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/settings":{"get":{"description":"Required scope: `wiki:read`.","operationId":"getTeamWikiSettings","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiSettings"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Get the settings of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"patch":{"description":"Required scope: `wiki:write`.","operationId":"updateTeamWikiSettings","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiSettingsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiSettings"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Update the settings of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/tree":{"get":{"description":"Lists each page's parent, position and kind (page or folder).\n\nRequired scope: `wiki:read`.","operationId":"getTeamWikiTree","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiTreeNode"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Get the page tree of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `wiki:write`.","operationId":"createTeamWikiTreePage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWikiTreePageRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Create a page or folder under a parent in a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/{pageId}":{"delete":{"description":"Its child pages move up to its parent. The page can be restored until restorable_until.\n\nRequired scope: `wiki:write`.","operationId":"deleteTeamWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Delete a page of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"},"get":{"description":"Required scope: `wiki:read`.","operationId":"getTeamWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Get a page of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"patch":{"description":"Send the version you read; a stale version is rejected so concurrent edits are not lost.\n\nRequired scope: `wiki:write`.","operationId":"updateTeamWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWikiPageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The page changed since the given version. Read it again before saving."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Update a page of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/{pageId}/backlinks":{"get":{"description":"Issues that mention the page in their description or a comment or have it attached, and pages that mention it, limited to what the caller can see. The issues are listed only with issues:read.\n\nRequired scope: `wiki:read`.","operationId":"listTeamWikiPageBacklinks","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiBacklinks"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"List where a team wiki page is referenced","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/{pageId}/move":{"post":{"description":"Returns the new tree.\n\nRequired scope: `wiki:write`.","operationId":"moveTeamWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveWikiPageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiTreeNode"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Move a page within a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/{pageId}/publish":{"get":{"description":"Required scope: `wiki:read`.","operationId":"getTeamWikiPagePublication","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPublication"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Get how a team wiki page is published","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"},"put":{"description":"Mode is off, internal or public. Only roles allowed by the workspace may publish publicly.\n\nRequired scope: `wiki:write`.","operationId":"publishTeamWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPublishRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPublication"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Pages of a private team cannot be published publicly."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Publish or unpublish a team wiki page","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/{pageId}/restore":{"post":{"description":"Within the grace period (ISSUE_DELETE_GRACE_PERIOD, 30 days by default) the page comes back under its parent, or at the top level if the parent is gone; after it the response is 410 GRACE_EXPIRED.\n\nRequired scope: `wiki:write`.","operationId":"restoreTeamWikiPage","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:write"]}],"summary":"Restore a deleted page of a team wiki","tags":["Wiki"],"x-kuayle-scopes":["wiki:write"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/teams/{teamId}/wiki/{pageId}/versions":{"get":{"description":"Required scope: `wiki:read`.","operationId":"listTeamWikiPageVersions","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Team ID.","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Wiki page ID.","in":"path","name":"pageId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiRevision"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"List the earlier versions of a team wiki page","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/views":{"get":{"description":"Lists the user's own views and the views shared with the workspace.\n\nRequired scope: `views:read`.","operationId":"listViews","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/View"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["views:read"]}],"summary":"List saved views","tags":["Views"],"x-kuayle-scopes":["views:read"],"x-kuayle-stability":"stable"},"post":{"description":"Required scope: `view:manage`.","operationId":"createView","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateViewRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/View"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["view:manage"]}],"summary":"Create a saved view","tags":["Views"],"x-kuayle-scopes":["view:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/views/{id}":{"delete":{"description":"Only the creator can delete a view.\n\nRequired scope: `view:manage`.","operationId":"deleteView","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["view:manage"]}],"summary":"Delete a saved view","tags":["Views"],"x-kuayle-scopes":["view:manage"],"x-kuayle-stability":"stable"},"get":{"description":"Required scope: `views:read`.","operationId":"getView","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/View"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["views:read"]}],"summary":"Get a saved view","tags":["Views"],"x-kuayle-scopes":["views:read"],"x-kuayle-stability":"stable"},"patch":{"description":"Only the creator can change a view.\n\nRequired scope: `view:manage`.","operationId":"updateView","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateViewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/View"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["view:manage"]}],"summary":"Update a saved view","tags":["Views"],"x-kuayle-scopes":["view:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/webhooks":{"get":{"description":"The signing secret is never returned.\n\nRequired scope: `workspace:manage`.","operationId":"listWebhooks","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Webhook"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["workspace:manage"]}],"summary":"List webhooks","tags":["Webhooks"],"x-kuayle-scopes":["workspace:manage"],"x-kuayle-stability":"stable"},"post":{"description":"The URL must be public: private, loopback and link-local addresses are rejected. The secret is stored encrypted and signs every delivery. A workspace that has or had a private team delivers no webhooks: there it answers 403 PRIVATE_WORKSPACE_OPERATION_DISABLED.\n\nRequired scope: `workspace:manage`.","operationId":"createWebhook","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["workspace:manage"]}],"summary":"Create a webhook","tags":["Webhooks"],"x-kuayle-scopes":["workspace:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/webhooks/{id}":{"delete":{"description":"Required scope: `workspace:manage`.","operationId":"deleteWebhook","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResult"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["workspace:manage"]}],"summary":"Delete a webhook","tags":["Webhooks"],"x-kuayle-scopes":["workspace:manage"],"x-kuayle-stability":"stable"},"patch":{"description":"Fields left out are unchanged. events, when sent, must list at least one event, and a changed list may name only issue.created, issue.updated, issue.deleted, issue.triaged, comment.created, comment.updated and comment.deleted. The webhook's stored list sent back unchanged is accepted even when it names an event Kuayle no longer delivers. Enabling an inactive webhook is refused the same way as creating one; disabling, editing and deleting still work. A workspace that has or had a private team delivers no webhooks: there it answers 403 PRIVATE_WORKSPACE_OPERATION_DISABLED.\n\nRequired scope: `workspace:manage`.","operationId":"updateWebhook","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["workspace:manage"]}],"summary":"Update a webhook","tags":["Webhooks"],"x-kuayle-scopes":["workspace:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/webhooks/{id}/deliveries":{"get":{"description":"The 50 most recent deliveries, newest first: pending, delivered or failed, with the attempts made, the last HTTP status and error code, and the next attempt of a pending one. Finished deliveries are kept for seven days. Payloads and the URL are not returned.\n\nRequired scope: `workspace:manage`.","operationId":"listWebhookDeliveries","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Resource ID.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["workspace:manage"]}],"summary":"List a webhook's recent deliveries","tags":["Webhooks"],"x-kuayle-scopes":["workspace:manage"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/wiki/references":{"get":{"description":"Pages of every team and project the caller can see, most recently updated first.\n\nRequired scope: `wiki:read`.","operationId":"searchWikiReferences","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Text the page title contains.","in":"query","name":"q","schema":{"type":"string"}},{"description":"Pages to return, 1 to 20.","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiReference"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Search wiki pages to reference","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"}},"/api/workspaces/{slug}/wiki/references/resolve":{"post":{"description":"Answers every requested page ID: with title and team or project when the caller can see the page, and with accessible false otherwise.\n\nRequired scope: `wiki:read`.","operationId":"resolveWikiReferences","parameters":[{"description":"Workspace slug, as in the app's URLs.","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveWikiReferencesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WikiReference"},"type":"array"}}},"description":"Success."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"personalAccessToken":["wiki:read"]}],"summary":"Resolve wiki page references","tags":["Wiki"],"x-kuayle-scopes":["wiki:read"],"x-kuayle-stability":"stable"}}},"security":[{"personalAccessToken":[]}],"servers":[{"description":"Your Kuayle instance. Paths already include /api.","url":"{instance}","variables":{"instance":{"default":"http://localhost:8080","description":"Origin of the instance, without a trailing slash."}}}],"tags":[{"description":"The user a token belongs to.","name":"Account"},{"description":"Workspaces the user belongs to. Most paths start with a workspace slug.","name":"Workspaces"},{"description":"People in a workspace and their roles: owner, admin, member or guest.","name":"Members"},{"description":"Teams own issues, statuses and cycles. Private teams are visible to their members, owners and admins.","name":"Teams"},{"description":"A team's workflow statuses, each in one category: backlog, unstarted, started, completed or cancelled.","name":"Statuses"},{"description":"Date-bound iterations of a team. Tokens read cycles; they are changed in the app.","name":"Cycles"},{"description":"Issues are addressed by identifier, for example ENG-42.","name":"Issues"},{"description":"Threaded comments on an issue.","name":"Comments"},{"description":"Links between issues: related, blocked_by, blocking or duplicate.","name":"Issue relations"},{"description":"Workspace and project labels.","name":"Labels"},{"description":"Projects group issues across teams.","name":"Projects"},{"description":"Saved issue filters. Tokens read views; they are changed in the app.","name":"Views"},{"description":"Pages of a team's or a project's wiki, with version history, a tree, a dated registry and publication.","name":"Wiki"},{"description":"Signed HTTP callbacks for a workspace. See Webhooks and signature verification.","name":"Webhooks"}],"webhooks":{"comment.created":{"post":{"description":"A comment was posted on an issue. The payload holds the comment and the issue's id, identifier and team_id. See Webhooks and signature verification.","operationId":"receiveCommentCreated","parameters":[{"description":"\"sha256=\" followed by the hex HMAC-SHA256 of the raw body, keyed with the webhook's secret.","in":"header","name":"X-Webhook-Signature","required":true,"schema":{"pattern":"^sha256=[0-9a-f]{64}$","type":"string"}},{"description":"The event name, as in the body.","in":"header","name":"X-Webhook-Event","required":true,"schema":{"enum":["comment.created"],"type":"string"}},{"description":"The delivery's id, the same in every attempt: use it to ignore a delivery you already handled.","in":"header","name":"X-Webhook-Delivery","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentEventDelivery"}}},"required":true},"responses":{"2XX":{"description":"The delivery is done."},"default":{"description":"Any other status, a timeout or a network error fails the attempt; it is retried later with the same body and delivery id."}},"security":[],"summary":"The comment.created delivery sent to your URL"}},"comment.deleted":{"post":{"description":"A comment was deleted by a workspace admin or owner. The payload is that of comment.created, with the comment as it was when it was deleted; its replies are hidden with it and send no deliveries of their own. Restoring the comment within the grace period sends no event. See Webhooks and signature verification.","operationId":"receiveCommentDeleted","parameters":[{"description":"\"sha256=\" followed by the hex HMAC-SHA256 of the raw body, keyed with the webhook's secret.","in":"header","name":"X-Webhook-Signature","required":true,"schema":{"pattern":"^sha256=[0-9a-f]{64}$","type":"string"}},{"description":"The event name, as in the body.","in":"header","name":"X-Webhook-Event","required":true,"schema":{"enum":["comment.deleted"],"type":"string"}},{"description":"The delivery's id, the same in every attempt: use it to ignore a delivery you already handled.","in":"header","name":"X-Webhook-Delivery","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentEventDelivery"}}},"required":true},"responses":{"2XX":{"description":"The delivery is done."},"default":{"description":"Any other status, a timeout or a network error fails the attempt; it is retried later with the same body and delivery id."}},"security":[],"summary":"The comment.deleted delivery sent to your URL"}},"comment.updated":{"post":{"description":"A comment was resolved, reopened or edited by its author. The payload is that of comment.created, with the comment as stored after the change; an edit sets edited_at. Resolving a resolved comment, reopening an open one or saving an unchanged body sends nothing. See Webhooks and signature verification.","operationId":"receiveCommentUpdated","parameters":[{"description":"\"sha256=\" followed by the hex HMAC-SHA256 of the raw body, keyed with the webhook's secret.","in":"header","name":"X-Webhook-Signature","required":true,"schema":{"pattern":"^sha256=[0-9a-f]{64}$","type":"string"}},{"description":"The event name, as in the body.","in":"header","name":"X-Webhook-Event","required":true,"schema":{"enum":["comment.updated"],"type":"string"}},{"description":"The delivery's id, the same in every attempt: use it to ignore a delivery you already handled.","in":"header","name":"X-Webhook-Delivery","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentEventDelivery"}}},"required":true},"responses":{"2XX":{"description":"The delivery is done."},"default":{"description":"Any other status, a timeout or a network error fails the attempt; it is retried later with the same body and delivery id."}},"security":[],"summary":"The comment.updated delivery sent to your URL"}},"issue.created":{"post":{"description":"An issue was created, including sub-issues and duplicates. A workspace import does not send it. See Webhooks and signature verification.","operationId":"receiveIssueCreated","parameters":[{"description":"\"sha256=\" followed by the hex HMAC-SHA256 of the raw body, keyed with the webhook's secret.","in":"header","name":"X-Webhook-Signature","required":true,"schema":{"pattern":"^sha256=[0-9a-f]{64}$","type":"string"}},{"description":"The event name, as in the body.","in":"header","name":"X-Webhook-Event","required":true,"schema":{"enum":["issue.created"],"type":"string"}},{"description":"The delivery's id, the same in every attempt: use it to ignore a delivery you already handled.","in":"header","name":"X-Webhook-Delivery","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueEventDelivery"}}},"required":true},"responses":{"2XX":{"description":"The delivery is done."},"default":{"description":"Any other status, a timeout or a network error fails the attempt; it is retried later with the same body and delivery id."}},"security":[],"summary":"The issue.created delivery sent to your URL"}},"issue.deleted":{"post":{"description":"An issue was deleted. The payload holds the issue as it was when it was deleted. A bulk delete sends one delivery per issue; issues deleted with their team send none. See Webhooks and signature verification.","operationId":"receiveIssueDeleted","parameters":[{"description":"\"sha256=\" followed by the hex HMAC-SHA256 of the raw body, keyed with the webhook's secret.","in":"header","name":"X-Webhook-Signature","required":true,"schema":{"pattern":"^sha256=[0-9a-f]{64}$","type":"string"}},{"description":"The event name, as in the body.","in":"header","name":"X-Webhook-Event","required":true,"schema":{"enum":["issue.deleted"],"type":"string"}},{"description":"The delivery's id, the same in every attempt: use it to ignore a delivery you already handled.","in":"header","name":"X-Webhook-Delivery","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueEventDelivery"}}},"required":true},"responses":{"2XX":{"description":"The delivery is done."},"default":{"description":"Any other status, a timeout or a network error fails the attempt; it is retried later with the same body and delivery id."}},"security":[],"summary":"The issue.deleted delivery sent to your URL"}},"issue.triaged":{"post":{"description":"An issue was accepted or declined from triage. Declining also moves it to cancelled: that is part of this event, not a separate issue.updated. See Webhooks and signature verification.","operationId":"receiveIssueTriaged","parameters":[{"description":"\"sha256=\" followed by the hex HMAC-SHA256 of the raw body, keyed with the webhook's secret.","in":"header","name":"X-Webhook-Signature","required":true,"schema":{"pattern":"^sha256=[0-9a-f]{64}$","type":"string"}},{"description":"The event name, as in the body.","in":"header","name":"X-Webhook-Event","required":true,"schema":{"enum":["issue.triaged"],"type":"string"}},{"description":"The delivery's id, the same in every attempt: use it to ignore a delivery you already handled.","in":"header","name":"X-Webhook-Delivery","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueEventDelivery"}}},"required":true},"responses":{"2XX":{"description":"The delivery is done."},"default":{"description":"Any other status, a timeout or a network error fails the attempt; it is retried later with the same body and delivery id."}},"security":[],"summary":"The issue.triaged delivery sent to your URL"}},"issue.updated":{"post":{"description":"An issue changed: a field, its status, assignees, labels, project, parent or cycle, including bulk edits, unfinished issues moved to the next cycle and automation. A bulk operation sends one delivery per issue. Changes the database makes by itself, such as clearing a deleted project, cycle or parent, send none. See Webhooks and signature verification.","operationId":"receiveIssueUpdated","parameters":[{"description":"\"sha256=\" followed by the hex HMAC-SHA256 of the raw body, keyed with the webhook's secret.","in":"header","name":"X-Webhook-Signature","required":true,"schema":{"pattern":"^sha256=[0-9a-f]{64}$","type":"string"}},{"description":"The event name, as in the body.","in":"header","name":"X-Webhook-Event","required":true,"schema":{"enum":["issue.updated"],"type":"string"}},{"description":"The delivery's id, the same in every attempt: use it to ignore a delivery you already handled.","in":"header","name":"X-Webhook-Delivery","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueEventDelivery"}}},"required":true},"responses":{"2XX":{"description":"The delivery is done."},"default":{"description":"Any other status, a timeout or a network error fails the attempt; it is retried later with the same body and delivery id."}},"security":[],"summary":"The issue.updated delivery sent to your URL"}}},"x-kuayle-guide":[{"id":"authentication","title":"Authentication","paragraphs":["Every request is authenticated with a personal access token. Create one in the app under Settings, API Tokens: choose its scopes, optionally limit it to some workspaces and give it an expiry date. The token is shown once and stored only as a hash.","Send the token in the Authorization header as \"Bearer kuayle_pat_...\". Use HTTPS; a token grants access until it expires or is revoked.","A token acts as the user who created it and never has more access than that user. Creating, listing and revoking tokens needs a signed-in browser session and is not possible with a token."],"code":{"language":"sh","text":"curl -H \"Authorization: Bearer $KUAYLE_TOKEN\" \\\n  https://kuayle.example.com/api/workspaces"}},{"id":"scopes","title":"Token scopes","paragraphs":["Each operation names the scope it needs. A request passes when the token has that scope and the user's workspace role grants the same permission: scopes are a ceiling on the role, not an addition to it. Guests, for example, only read, whatever scopes their token carries.","A request without the needed scope or permission gets 403 FORBIDDEN. Private teams stay invisible to non-members: their issues, projects, cycles and wiki pages answer 404 or are left out of lists.","Scopes used by this reference:"],"list":["account:read","comments:read","cycle:manage","cycles:read","issue:create","issue:delete","issue:delete_own","issue:update","issues:read","label:manage","labels:read","member:invite","members:read","project:manage","projects:read","team:manage","teams:read","view:manage","views:read","wiki:read","wiki:write","workspace:manage","workspaces:read"]},{"id":"pagination","title":"Pagination","paragraphs":["The issue list is paginated with the page and per_page query parameters (per_page defaults to 50 and should not exceed 100). The response wraps the items in data and adds total_count, page, per_page and has_more; request the next page while has_more is true.","The wiki registry and its overviews use a cursor: pass the next_before value of one response as before in the next request, and stop when next_before is null.","Every other list returns all items the user can see in one JSON array."]},{"id":"errors","title":"Errors","paragraphs":["Errors use the HTTP status and one JSON shape: an error object with a machine-readable code, a message for people, and for validation errors a details array naming each field."],"list":["400 BAD_REQUEST: malformed JSON, an invalid ID, or a rule the request breaks; the message says which","400 VALIDATION_ERROR: one or more fields are invalid; see details","401 UNAUTHORIZED: the token is missing, unknown, expired or revoked","403 FORBIDDEN: the token's scopes, workspace limit or the user's role do not allow the request","404 NOT_FOUND: the resource does not exist or the user cannot see it","409 with a specific code such as CONFLICT or WIKI_VERSION_CONFLICT: the request conflicts with the current state","429 RATE_LIMITED: too many requests; wait for the number of seconds in the Retry-After header","500 INTERNAL_ERROR: the server failed; the request can be retried"],"code":{"language":"json","text":"{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Request validation failed\",\n    \"details\": [{ \"field\": \"Title\", \"message\": \"Title is required\" }]\n  }\n}"}},{"id":"rate-limits","title":"Rate limits","paragraphs":["Kuayle does not apply a request quota to authenticated API calls. Unauthenticated endpoints are limited per IP address: sign-in endpoints refill 5 requests per second with a burst of 10, and this document refills 10 per second with a burst of 20. A limited request gets 429 RATE_LIMITED with a Retry-After header.","The operator of an instance can add limits at the reverse proxy, so treat 429 as retryable everywhere: wait for Retry-After, then retry. Keep bulk jobs sequential or at low concurrency; the instance is shared with the people using the app."]},{"id":"webhooks","title":"Webhooks and signature verification","paragraphs":["A webhook is a URL of yours registered for a workspace with a secret and a list of event names. The URL must be reachable from the instance and must not be a private, loopback or link-local address. The secret is stored encrypted and never returned.","A delivery is an HTTP POST with a JSON body holding event, payload and timestamp (RFC 3339, UTC). The X-Webhook-Event header repeats the event name. The X-Webhook-Signature header is \"sha256=\" followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook's secret. The X-Webhook-Delivery header is the delivery's id, the same in every attempt.","To verify a delivery, compute the same HMAC over the bytes you received, before parsing them, and compare it with the header in constant time. Reject the request when they differ. Deliveries time out after 10 seconds, so answer with a 2xx status quickly and do slow work afterwards.","Deliveries are sent after the change is saved: one per webhook subscribed to the event, and one per issue for bulk operations (bulk edits and deletes, unfinished issues moved to the next cycle). The issue in an issue event is the stored issue: its ids, identifier, title, description, status, priority, dates and timestamps, including started_at, completed_at, cancelled_at and triaged_at. actor_id is the user whose change caused the event, also for a follow-up Kuayle makes for them, such as closing a parent whose sub-issues are all done. It is null only for system automation: status transitions from forge and GitHub activity.","Delivery is at least once. Each change is stored when it is saved, one delivery per webhook, and survives restarts and updates of the instance; a delivery interrupted by a restart is sent again. A timeout, a network error or a status other than 2xx fails the attempt, and the delivery is retried with the same body, signature and X-Webhook-Delivery after 30 seconds, 2 minutes, 10 minutes, 30 minutes and 2 hours. After the sixth failed attempt, or once it has waited a day, it is given up. Use X-Webhook-Delivery to ignore a delivery you already handled. Each workspace has one delivery in flight at a time, workspaces take turns, and each workspace may hold at most 1024 pending deliveries and 8 MiB of payloads, and each webhook 256 deliveries, so a busy workspace or a dead receiver does not crowd out others; a delivery beyond these bounds is dropped. The webhook's delivery log (GET .../webhooks/{id}/deliveries) shows recent deliveries with their status, attempts, last status and error, and next attempt.","A webhook whose deliveries fail three times in a row is paused for five minutes: its deliveries wait while the workspace's other webhooks keep receiving theirs. After the pause the earliest due delivery is attempted; a success resumes the webhook and a failure pauses it again. A first attempt goes out in the order the changes were saved, but a retry arrives after later deliveries: do not rely on order. Compare payload.issue.updated_at (the envelope timestamp has one-second resolution), or fetch the issue again for its current state.","Webhooks are workspace-level and have no user, so they never deliver content of private teams: a workspace that has, or ever had, a private team does not deliver webhooks at all, creating or enabling a webhook there is refused with 403 PRIVATE_WORKSPACE_OPERATION_DISABLED, and a stored delivery is checked again when it is sent. Changes the database makes by itself send no event: deleting a parent detaches its sub-issues, deleting a project or cycle clears it from its issues, deleting a team deletes its issues and renaming a team key changes identifiers. A workspace import sends none either. Kuayle delivers these events:"],"list":["issue.created: An issue was created, including sub-issues and duplicates. A workspace import does not send it.","issue.updated: An issue changed: a field, its status, assignees, labels, project, parent or cycle, including bulk edits, unfinished issues moved to the next cycle and automation. A bulk operation sends one delivery per issue. Changes the database makes by itself, such as clearing a deleted project, cycle or parent, send none.","issue.deleted: An issue was deleted. The payload holds the issue as it was when it was deleted. A bulk delete sends one delivery per issue; issues deleted with their team send none.","issue.triaged: An issue was accepted or declined from triage. Declining also moves it to cancelled: that is part of this event, not a separate issue.updated.","comment.created: A comment was posted on an issue. The payload holds the comment and the issue's id, identifier and team_id.","comment.updated: A comment was resolved, reopened or edited by its author. The payload is that of comment.created, with the comment as stored after the change; an edit sets edited_at. Resolving a resolved comment, reopening an open one or saving an unchanged body sends nothing.","comment.deleted: A comment was deleted by a workspace admin or owner. The payload is that of comment.created, with the comment as it was when it was deleted; its replies are hidden with it and send no deliveries of their own. Restoring the comment within the grace period sends no event."],"code":{"language":"js","text":"import { createHmac, timingSafeEqual } from 'node:crypto';\n\n// rawBody: the request body bytes exactly as received, before any JSON parsing.\nexport function isFromKuayle(rawBody, signatureHeader, secret) {\n  const expected = 'sha256=' + createHmac('sha256', secret).update(rawBody).digest('hex');\n  const received = Buffer.from(signatureHeader ?? '');\n  return received.length === expected.length && timingSafeEqual(received, Buffer.from(expected));\n}"}},{"id":"stability","title":"Stability and versions","paragraphs":["This document lists the stable operations. Its version is the Kuayle release it was built from, and each instance serves the document for its own release at /api/openapi.json. Changes to a stable operation ship with a release and are listed in its notes.","Routes of the app that are not listed here are internal: they serve the web app, the dev machines or integration setup, may change in any release, and most reject tokens."]}]}