{"components":{"schemas":{"Attachment":{"additionalProperties":false,"properties":{"content_type":{"maxLength":200,"type":"string"},"filename":{"maxLength":255,"type":"string"},"id":{"minimum":1,"type":"integer"},"size":{"maximum":10485760,"minimum":0,"type":"integer"},"url":{"format":"uri-reference","type":"string"}},"required":["id","filename","content_type","size","url"],"type":"object"},"Bug":{"additionalProperties":false,"properties":{"category":{"description":"Free text. Empty string clears this field.","maxLength":200,"type":"string"},"changed_at":{"format":"date-time","type":"string"},"changed_by":{"maxLength":100,"type":"string"},"component":{"description":"Free text, e.g. frontend, backend, android app.","maxLength":200,"type":"string"},"description":{"maxLength":100000,"type":"string"},"number":{"minimum":1,"type":"integer"},"priority":{"enum":["low","normal","high","urgent"],"type":"string"},"resolution":{"description":"Optional reason, only for resolved bugs. duplicate requires an active duplicate_of relationship. Reopening clears an omitted resolution.","enum":["","fixed","duplicate","invalid","wontfix"],"type":"string"},"status":{"enum":["new","confirmed","resolved"],"type":"string"},"title":{"maxLength":300,"minLength":1,"pattern":"\\S","type":"string"},"type":{"description":"Free text, e.g. feature, bugfix, task.","maxLength":200,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["number","version","title","status","priority","changed_by","changed_at"],"type":"object"},"BugLink":{"additionalProperties":false,"properties":{"number":{"minimum":1,"type":"integer"},"type":{"enum":["related","blocks","blocked_by","duplicate_of"],"type":"string"}},"required":["type","number"],"type":"object"},"BugPage":{"additionalProperties":false,"properties":{"items":{"items":{"$ref":"#/components/schemas/Summary"},"type":"array"},"next_after":{"minimum":1,"type":"integer"},"next_cursor":{"maxLength":1024,"type":"string"}},"required":["items"],"type":"object"},"Comment":{"additionalProperties":false,"properties":{"attachments":{"items":{"$ref":"#/components/schemas/Attachment"},"maxItems":5,"type":"array"},"author":{"maxLength":100,"type":"string"},"body":{"maxLength":10000,"type":"string"},"changed_at":{"format":"date-time","type":"string"},"changed_by":{"maxLength":100,"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted":{"type":"boolean"},"id":{"minimum":1,"type":"integer"},"version":{"minimum":1,"type":"integer"}},"required":["id","version","author","created_at","changed_by","changed_at","attachments"],"type":"object"},"CommentPage":{"additionalProperties":false,"properties":{"items":{"items":{"$ref":"#/components/schemas/Comment"},"type":"array"},"next_after":{"minimum":1,"type":"integer"}},"required":["items"],"type":"object"},"CreateBug":{"additionalProperties":false,"properties":{"category":{"description":"Free text. Empty string clears this field.","maxLength":200,"type":"string"},"component":{"description":"Free text, e.g. frontend, backend, android app.","maxLength":200,"type":"string"},"description":{"maxLength":100000,"type":"string"},"duplicate_of":{"minimum":1,"type":"integer"},"priority":{"default":"normal","enum":["low","normal","high","urgent"],"type":"string"},"resolution":{"description":"Optional reason, only for resolved bugs. duplicate requires an active duplicate_of relationship. Reopening clears an omitted resolution.","enum":["","fixed","duplicate","invalid","wontfix"],"type":"string"},"status":{"default":"new","enum":["new","confirmed","resolved"],"type":"string"},"title":{"maxLength":300,"minLength":1,"pattern":"\\S","type":"string"},"type":{"description":"Free text, e.g. feature, bugfix, task.","maxLength":200,"type":"string"}},"required":["title"],"type":"object"},"CreateComment":{"additionalProperties":false,"properties":{"body":{"maxLength":10000,"minLength":1,"pattern":"\\S","type":"string"}},"required":["body"],"type":"object"},"CreateRelationship":{"additionalProperties":false,"properties":{"number":{"minimum":1,"type":"integer"},"type":{"enum":["blocks","blocked_by","related","duplicate_of","has_duplicate"],"type":"string"}},"required":["type","number"],"type":"object"},"Credential":{"additionalProperties":false,"properties":{"expires_at":{"format":"date-time","type":["string","null"]},"instructions":{"description":"Private Markdown containing the bearer token, returned only in agent mode. Keep gitignored.","type":"string"},"link_expires_at":{"format":"date-time","type":"string"},"login_url":{"description":"One-time browser login URL; returned only in browser mode.","format":"uri","type":"string"},"mode":{"enum":["agent","browser"],"type":"string"},"role":{"enum":["read","write","admin"],"type":"string"},"token_id":{"minimum":1,"type":"integer"},"workspace":{"maxLength":63,"type":"string"}},"required":["token_id","mode","role","workspace","expires_at"],"type":"object"},"Discovery":{"additionalProperties":false,"properties":{"guide":{"maxLength":200,"type":"string"},"me":{"maxLength":200,"type":"string"},"openapi":{"maxLength":200,"type":"string"},"workspaces":{"maxLength":200,"type":"string"}},"required":["openapi","guide","me","workspaces"],"type":"object"},"Event":{"additionalProperties":false,"properties":{"affected_bugs":{"items":{"minimum":1,"type":"integer"},"maxItems":2,"minItems":1,"type":"array"},"changed_at":{"format":"date-time","type":"string"},"changed_by":{"maxLength":100,"type":"string"},"comment_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["bug.created","bug.updated","comment.created","comment.updated","comment.deleted","relationship.added","relationship.removed","relationship.imported"],"type":"string"},"number":{"minimum":1,"type":"integer"},"relationship_id":{"minimum":1,"type":"integer"},"relationship_type":{"enum":["blocks","duplicate_of","related"],"type":"string"},"source":{"minimum":1,"type":"integer"},"target":{"minimum":1,"type":"integer"},"version":{"minimum":1,"type":"integer"}},"required":["id","kind","version","affected_bugs","changed_at"],"type":"object"},"EventPage":{"additionalProperties":false,"properties":{"cursor":{"minimum":0,"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/Event"},"type":"array"},"next_after":{"minimum":1,"type":"integer"}},"required":["items","cursor"],"type":"object"},"HistoryPage":{"additionalProperties":false,"properties":{"items":{"items":{"$ref":"#/components/schemas/Revision"},"type":"array"},"next_after":{"minimum":1,"type":"integer"}},"required":["items"],"type":"object"},"Identity":{"additionalProperties":false,"properties":{"role":{"enum":["read","write","admin","superadmin"],"type":"string"},"token_id":{"minimum":1,"type":"integer"},"username":{"pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.@-]{0,99}$","type":"string"},"workspace":{"maxLength":63,"type":"string"}},"required":["username","token_id","role","workspace"],"type":"object"},"IssueCredential":{"additionalProperties":false,"properties":{"expires_at":{"format":"date-time","type":"string"},"mode":{"enum":["agent","browser"],"type":"string"},"name":{"maxLength":200,"type":"string"},"role":{"enum":["read","write","admin"],"type":"string"},"username":{"pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.@-]{0,99}$","type":"string"}},"required":["username","role","mode"],"type":"object"},"LoginRequest":{"additionalProperties":false,"properties":{"login_token":{"minLength":1,"type":"string"}},"required":["login_token"],"type":"object"},"NewWorkspace":{"additionalProperties":false,"properties":{"name":{"maxLength":200,"minLength":1,"pattern":"\\S","type":"string"},"public":{"default":false,"type":"boolean"},"slug":{"pattern":"^[a-z0-9][a-z0-9-]{0,62}$","type":"string"}},"required":["slug","name"],"type":"object"},"PatchBug":{"additionalProperties":false,"properties":{"category":{"description":"Free text. Empty string clears this field.","maxLength":200,"type":"string"},"component":{"description":"Free text, e.g. frontend, backend, android app.","maxLength":200,"type":"string"},"description":{"maxLength":100000,"type":"string"},"duplicate_of":{"description":"Atomic command to add a duplicate_of relationship while resolving this bug as a duplicate. Not a stored bug field. An existing different or inactive target must be handled explicitly.","minimum":1,"type":"integer"},"priority":{"enum":["low","normal","high","urgent"],"type":"string"},"resolution":{"description":"Optional reason, only for resolved bugs. duplicate requires an active duplicate_of relationship. Reopening clears an omitted resolution.","enum":["","fixed","duplicate","invalid","wontfix"],"type":"string"},"status":{"enum":["new","confirmed","resolved"],"type":"string"},"title":{"maxLength":300,"minLength":1,"pattern":"\\S","type":"string"},"type":{"description":"Free text, e.g. feature, bugfix, task.","maxLength":200,"type":"string"},"version":{"description":"Required optimistic concurrency check. Use the current version from GET. A stale version returns 409 without changing anything.","minimum":1,"type":"integer"}},"required":["version"],"type":"object"},"PatchComment":{"additionalProperties":false,"properties":{"attachment_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":5,"type":"array","uniqueItems":true},"body":{"maxLength":10000,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version"],"type":"object"},"PatchRelationship":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"version":{"minimum":1,"type":"integer"}},"required":["version","active"],"type":"object"},"PatchWorkspace":{"additionalProperties":false,"properties":{"archived":{"type":"boolean"},"name":{"maxLength":200,"minLength":1,"pattern":"\\S","type":"string"},"public":{"type":"boolean"}},"type":"object"},"Problem":{"additionalProperties":false,"properties":{"detail":{"type":"string"},"status":{"minimum":400,"type":"integer"},"title":{"maxLength":200,"type":"string"},"type":{"format":"uri-reference","type":"string"}},"required":["type","title","status","detail"],"type":"object"},"Relationship":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"changed_at":{"format":"date-time","type":"string"},"changed_by":{"maxLength":100,"type":"string"},"id":{"minimum":1,"type":"integer"},"imported":{"type":"boolean"},"kind":{"enum":["blocks","duplicate_of","related"],"type":"string"},"number":{"minimum":1,"type":"integer"},"source":{"minimum":1,"type":"integer"},"target":{"minimum":1,"type":"integer"},"type":{"enum":["blocks","blocked_by","related","duplicate_of","has_duplicate"],"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","version","kind","source","target","active","changed_at"],"type":"object"},"RelationshipPage":{"additionalProperties":false,"properties":{"items":{"items":{"$ref":"#/components/schemas/Relationship"},"type":"array"},"next_after":{"minimum":1,"type":"integer"}},"required":["items"],"type":"object"},"Revision":{"additionalProperties":false,"properties":{"category":{"description":"Free text. Empty string clears this field.","maxLength":200,"type":"string"},"changed_at":{"format":"date-time","type":"string"},"changed_by":{"maxLength":100,"type":"string"},"component":{"description":"Free text, e.g. frontend, backend, android app.","maxLength":200,"type":"string"},"description":{"maxLength":100000,"type":"string"},"links":{"description":"Legacy outgoing links preserved in pre-migration snapshots only. Current relationships have their own endpoint and history.","items":{"$ref":"#/components/schemas/BugLink"},"type":"array"},"number":{"minimum":1,"type":"integer"},"priority":{"enum":["low","normal","high","urgent"],"type":"string"},"resolution":{"description":"Optional reason, only for resolved bugs. duplicate requires an active duplicate_of relationship. Reopening clears an omitted resolution.","enum":["","fixed","duplicate","invalid","wontfix"],"type":"string"},"status":{"enum":["new","confirmed","resolved"],"type":"string"},"title":{"maxLength":300,"minLength":1,"pattern":"\\S","type":"string"},"type":{"description":"Free text, e.g. feature, bugfix, task.","maxLength":200,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["number","version","title","status","priority","changed_by","changed_at"],"type":"object"},"Session":{"additionalProperties":false,"properties":{"expires_at":{"format":"date-time","type":["string","null"]},"role":{"enum":["read","write","admin","superadmin"],"type":"string"},"token":{"type":"string"},"token_id":{"minimum":1,"type":"integer"},"username":{"maxLength":100,"type":"string"},"workspace":{"maxLength":63,"type":"string"}},"required":["token","token_id","username","expires_at","role","workspace"],"type":"object"},"Summary":{"additionalProperties":false,"properties":{"category":{"description":"Free text. Empty string clears this field.","maxLength":200,"type":"string"},"component":{"description":"Free text, e.g. frontend, backend, android app.","maxLength":200,"type":"string"},"number":{"minimum":1,"type":"integer"},"priority":{"enum":["low","normal","high","urgent"],"type":"string"},"resolution":{"description":"Optional reason, only for resolved bugs. duplicate requires an active duplicate_of relationship. Reopening clears an omitted resolution.","enum":["","fixed","duplicate","invalid","wontfix"],"type":"string"},"status":{"enum":["new","confirmed","resolved"],"type":"string"},"title":{"maxLength":300,"minLength":1,"pattern":"\\S","type":"string"},"type":{"description":"Free text, e.g. feature, bugfix, task.","maxLength":200,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["number","version","title","status","priority"],"type":"object"},"Token":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"expires_at":{"description":"null means no expiration.","format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["agent","browser","login"],"type":"string"},"name":{"maxLength":200,"type":"string"},"revoked_at":{"format":"date-time","type":["string","null"]},"role":{"enum":["read","write","admin","superadmin"],"type":"string"},"username":{"pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.@-]{0,99}$","type":"string"},"workspace":{"maxLength":63,"type":"string"}},"required":["id","username","created_at","expires_at","revoked_at","kind","role"],"type":"object"},"TokenPage":{"additionalProperties":false,"properties":{"items":{"items":{"$ref":"#/components/schemas/Token"},"type":"array"},"next_after":{"minimum":1,"type":"integer"}},"required":["items"],"type":"object"},"Workspace":{"additionalProperties":false,"properties":{"access":{"enum":["read","write","admin"],"type":"string"},"archived":{"type":"boolean"},"name":{"maxLength":200,"type":"string"},"public":{"type":"boolean"},"slug":{"pattern":"^[a-z0-9][a-z0-9-]{0,62}$","type":"string"}},"required":["slug","name","access","public"],"type":"object"},"WorkspacePage":{"additionalProperties":false,"properties":{"items":{"items":{"$ref":"#/components/schemas/Workspace"},"type":"array"},"next_after":{"maxLength":63,"type":"string"}},"required":["items"],"type":"object"}},"securitySchemes":{"bearerAuth":{"description":"Run mutrack login USER --workspace SLUG --role write --agent, or bootstrap with --superadmin. No passwords. Optional expiration. Revocable through CLI or DELETE /api/v1/tokens/{token}.","scheme":"bearer","type":"http"}}},"info":{"description":"Compact API for coding agents and humans. Current values by default; history only on request. Start with /llms.txt. All lists are paginated (default 20, max 100). Category, component and type are free text. Permissions belong to tokens: read/write/admin scoped to one workspace, or global superadmin. Admins issue scoped credentials. Users identify authors only. Expiration is optional and all tokens are revocable.","title":"mutrack API","version":"1.0.0"},"openapi":"3.1.1","paths":{"/api/v1":{"get":{"operationId":"discover","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discovery"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"Discover API entry points"}},"/api/v1/me":{"get":{"operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get the authenticated user and current token ID"}},"/api/v1/sessions":{"post":{"description":"Atomically consumes a CLI-issued one-time login token and returns a distinct bearer session token. A login token is not an API bearer credential. Links expire in 10 minutes and cannot be reused. Session expiry is optional, as selected at CLI issuance.","operationId":"createSession","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"Redeem a one-time browser login token"}},"/api/v1/tokens":{"get":{"operationId":"listTokens","parameters":[{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"List your current token and credentials you can administer"}},"/api/v1/tokens/{token}":{"delete":{"operationId":"revokeToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Revoke a credential permitted by your current token role"}},"/api/v1/workspaces":{"get":{"operationId":"listWorkspaces","parameters":[{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"type":"string"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"List accessible workspaces"},"post":{"description":"POST is not idempotent. Check for success before retrying an ambiguous network failure.","operationId":"createWorkspace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewWorkspace"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}},"description":"Success","headers":{"Location":{"description":"Canonical URL of the created resource","schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Create a workspace (superadmin only)"}},"/api/v1/workspaces/{workspace}":{"get":{"operationId":"getWorkspace","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"Get a workspace and your access"},"patch":{"operationId":"updateWorkspace","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchWorkspace"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Rename, archive, or reopen a workspace (superadmin only)"}},"/api/v1/workspaces/{workspace}/bugs":{"get":{"description":"Compact current summaries only. Filters combine with AND. Default order and numeric after remain compatible; nondefault sorts use opaque next_cursor/cursor. Sorts use descending bug number to break ties. Lists are live: edits can move entries between pages; use /events for reliable incremental changes.","operationId":"listBugs","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"minimum":0,"type":"integer"}},{"description":"Opaque next_cursor returned for sort=newest, priority, or activity. Retain sort and filters; do not combine with after.","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"description":"open includes new and confirmed; closed includes resolved. Conflicting state/status/resolution filters are rejected.","in":"query","name":"state","schema":{"enum":["open","closed"],"type":"string"}},{"description":"Exact, case-sensitive filter.","in":"query","name":"status","schema":{"enum":["new","confirmed","resolved"],"type":"string"}},{"description":"Exact, case-sensitive filter.","in":"query","name":"priority","schema":{"enum":["low","normal","high","urgent"],"type":"string"}},{"description":"Exact, case-sensitive filter.","in":"query","name":"category","schema":{"type":"string"}},{"description":"Exact, case-sensitive filter.","in":"query","name":"component","schema":{"type":"string"}},{"description":"Exact, case-sensitive filter.","in":"query","name":"type","schema":{"type":"string"}},{"description":"Case-insensitive literal substring search in title and description; optionally current comments with search_comments=true.","in":"query","name":"q","schema":{"type":"string"}},{"description":"Default number: ascending number, uses after/next_after. Other orders descend and use cursor/next_cursor. Priority ties use descending number; activity includes comment changes.","in":"query","name":"sort","schema":{"enum":["number","newest","priority","activity"],"type":"string"}},{"description":"Include current undeleted comment text in q. Historical text and attachments are never searched.","in":"query","name":"search_comments","schema":{"default":false,"type":"boolean"}},{"description":"Exact, case-sensitive filter.","in":"query","name":"resolution","schema":{"enum":["fixed","duplicate","invalid","wontfix"],"type":"string"}},{"description":"Find bugs connected to this workspace-local bug number in either direction.","in":"query","name":"linked_to","schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BugPage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"List compact current summaries without descriptions or history"},"post":{"description":" Optional Idempotency-Key makes matching creation retries safe, including multipart comment uploads. Returns the original creation response even if the resource was later edited. Without a key, POST is not idempotent.","operationId":"createBug","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"description":"Reuse a unique key and the same decoded content for safe retries. Scoped to this token, workspace and endpoint. Matching retries return the original 201 response; different content returns 409. Receipts persist indefinitely; authentication, write access and archive rules are checked on every retry.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":128,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBug"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bug"}}},"description":"Success","headers":{"Location":{"description":"Canonical URL of the created resource","schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"File a bug; only title is required"}},"/api/v1/workspaces/{workspace}/bugs/{number}":{"get":{"description":"Anonymous reads are allowed when the workspace is public. Returns only the latest snapshot. Empty optional text is omitted. No history or comments. Use the separate /history endpoint explicitly.","operationId":"getBug","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bug"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"Get current values only; no history or comments"},"patch":{"description":"Partial JSON update (not JSON Merge Patch). Required version prevents lost updates. Omitted fields stay unchanged; empty string clears optional text; null and unknown keys are rejected. A no-op returns the existing version. Every effective change appends a complete immutable revision. Use the separate comments endpoint for discussion and file attachments. The response contains current values only.","operationId":"updateBug","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchBug"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bug"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Update selected fields using the current version"}},"/api/v1/workspaces/{workspace}/bugs/{number}/comments":{"get":{"description":"Returns current comments only, with attachment metadata and download URLs, never file bytes or edit history. Deleted comments are hidden unless include_deleted=true is explicitly supplied with a valid scoped credential. Active comments are publicly readable in public workspaces.","operationId":"listComments","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Explicitly include deleted comments. Requires a scoped read/write/admin or superadmin token, including for public workspaces.","in":"query","name":"include_deleted","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentPage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"List current comments; deleted comments require an explicit request"},"post":{"description":"Requires workspace write access. Accepts text-only application/json or multipart/form-data with body and repeated file parts (any file type). At least text or one attachment must remain. Maximum 5 attachments, 10 MiB per file, 25 MiB total; request limit 26 MiB. Files and metadata are stored atomically. Comments are independent of bug versions and are never embedded in bug responses. Optional Idempotency-Key makes matching creation retries safe, including multipart comment uploads. Returns the original creation response even if the resource was later edited. Without a key, POST is not idempotent.","operationId":"createComment","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Reuse a unique key and the same decoded content for safe retries. Scoped to this token, workspace and endpoint. Matching retries return the original 201 response; different content returns 409. Receipts persist indefinitely; authentication, write access and archive rules are checked on every retry.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":128,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateComment"}},"multipart/form-data":{"encoding":{"file":{"explode":true,"style":"form"}},"schema":{"additionalProperties":false,"anyOf":[{"required":["file"]},{"properties":{"body":{"minLength":1,"pattern":"\\S"}},"required":["body"]}],"properties":{"body":{"maxLength":10000,"type":"string"},"file":{"items":{"format":"binary","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}},"description":"Success","headers":{"Location":{"description":"Canonical URL of the created resource","schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Post text and optional file attachments"}},"/api/v1/workspaces/{workspace}/bugs/{number}/comments/{comment}":{"delete":{"description":"Requires workspace write access and the current comment version query parameter. Appends a deletion revision; never destroys text or files. A deleted comment disappears from default reads. No bug revision is created.","operationId":"deleteComment","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"comment","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Current resource version required for DELETE. On attachment GET, explicitly selects a historical revision and requires scoped authentication.","in":"query","name":"version","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Soft-delete a comment using its current version"},"get":{"description":"Returns current comments only, with attachment metadata and download URLs, never file bytes or edit history. Deleted comments are hidden unless include_deleted=true is explicitly supplied with a valid scoped credential. Active comments are publicly readable in public workspaces.","operationId":"getComment","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"comment","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Explicitly include deleted comments. Requires a scoped read/write/admin or superadmin token, including for public workspaces.","in":"query","name":"include_deleted","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"Get a current comment without edit history"},"patch":{"description":"Requires workspace write access. Accepts text-only application/json or multipart/form-data with body and repeated file parts (any file type). At least text or one attachment must remain. Maximum 5 attachments, 10 MiB per file, 25 MiB total; request limit 26 MiB. Files and metadata are stored atomically. Comments are independent of bug versions and are never embedded in bug responses. Required version prevents lost edits. Omitted body or attachment_ids stay unchanged; an empty attachment_ids array removes current files. IDs must belong to this comment's current version. New file parts append attachments. Edits preserve earlier text and attachment references; history is fetched separately.","operationId":"updateComment","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"comment","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchComment"}},"multipart/form-data":{"encoding":{"attachment_ids":{"contentType":"application/json"},"file":{"explode":true,"style":"form"}},"schema":{"additionalProperties":false,"properties":{"attachment_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":5,"type":"array","uniqueItems":true},"body":{"maxLength":10000,"type":"string"},"file":{"items":{"format":"binary","type":"string"},"maxItems":5,"minItems":1,"type":"array"},"version":{"minimum":1,"type":"integer"}},"required":["version"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Edit comment text and attachments using the current version"}},"/api/v1/workspaces/{workspace}/bugs/{number}/comments/{comment}/attachments/{attachment}":{"get":{"description":"Downloads arbitrary file bytes with Content-Disposition: attachment. The default URL serves only files in the current undeleted comment. Public workspace current files need no authentication. Use version=N explicitly for removed/deleted/historical files; this requires a scoped token. Uploaded active content never executes at the application origin.","operationId":"downloadAttachment","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"comment","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"attachment","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Current resource version required for DELETE. On attachment GET, explicitly selects a historical revision and requires scoped authentication.","in":"query","name":"version","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"Success","headers":{"Content-Disposition":{"description":"Attachment download with the original filename","schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"Download a file; historical files require an explicit version"}},"/api/v1/workspaces/{workspace}/bugs/{number}/comments/{comment}/history":{"get":{"description":"Explicitly fetches full comment revisions, including prior text, removed attachments and deletion tombstones. Requires scoped read access even for a public workspace. Cursor is the revision number; attachment URLs select their historical version.","operationId":"listCommentHistory","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"comment","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentPage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Explicitly fetch comment edit and deletion history"}},"/api/v1/workspaces/{workspace}/bugs/{number}/events":{"get":{"description":"Requires a scoped credential even in public workspaces. Returns compact metadata only, ordered by workspace activity. Includes existing history backfilled during migration. Save cursor and pass it as after on the next poll, including after an empty page; next_after indicates more pages now. Relationship changes emit one event with both affected_bugs. Relationship events carry canonical endpoints and the relationship version; imported events have no historical author. Per-bug feeds include events affecting either endpoint. No-ops and creation replays emit no events.","operationId":"listBugEvents","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Poll activity affecting this bug, including shared relationships"}},"/api/v1/workspaces/{workspace}/bugs/{number}/history":{"get":{"operationId":"listHistory","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryPage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Explicitly fetch immutable full revisions, oldest first"}},"/api/v1/workspaces/{workspace}/bugs/{number}/relationships":{"get":{"description":"Current active shared relationships from this bug's perspective, with canonical kind/source/target plus local type/number. blocks and blocked_by share an identity; duplicate_of reverses to has_duplicate; related is symmetric. History and removed relationships require explicit scoped reads. Bug GET never embeds relationships.","operationId":"listRelationships","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Explicitly include removed relationships; requires scoped authentication even in public workspaces.","in":"query","name":"include_inactive","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipPage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"List shared relationships from this bug's perspective"},"post":{"description":"Accepts either endpoint perspective, normalized into one shared identity. related pairs are ordered; inverse creation of an active relationship returns the existing identity without an event. Inactive identities return 409; restore explicitly with PATCH and their current version. Optional Idempotency-Key replays the original result. Changes never increment bug field versions.","operationId":"createRelationship","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Reuse a unique key and the same decoded content for safe retries. Scoped to this token, workspace and endpoint. Matching retries return the original 201 response; different content returns 409. Receipts persist indefinitely; authentication, write access and archive rules are checked on every retry.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":128,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRelationship"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Success","headers":{"Location":{"description":"Canonical URL of the created resource","schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Add a shared relationship from either endpoint"}},"/api/v1/workspaces/{workspace}/events":{"get":{"description":"Requires a scoped credential even in public workspaces. Returns compact metadata only, ordered by workspace activity. Includes existing history backfilled during migration. Save cursor and pass it as after on the next poll, including after an empty page; next_after indicates more pages now. Relationship changes emit one event with both affected_bugs. Relationship events carry canonical endpoints and the relationship version; imported events have no historical author. Per-bug feeds include events affecting either endpoint. No-ops and creation replays emit no events.","operationId":"listEvents","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Poll compact workspace activity using a durable cursor (scoped access required)"}},"/api/v1/workspaces/{workspace}/relationships/{relationship}":{"delete":{"description":"Version checks apply to the relationship. Changes append an immutable revision and one event affecting both bugs. No-ops emit nothing. Cannot remove the duplicate target of a bug still resolved as duplicate; change that resolution first. Duplicate targets are unique and cycles are rejected. Archived workspaces reject writes.","operationId":"deleteRelationship","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"relationship","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Current resource version required for DELETE. On attachment GET, explicitly selects a historical revision and requires scoped authentication.","in":"query","name":"version","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Remove a shared relationship from both bugs"},"get":{"operationId":"getRelationship","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"relationship","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Explicitly include removed relationships; requires scoped authentication even in public workspaces.","in":"query","name":"include_inactive","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[{},{"bearerAuth":[]}],"summary":"Get a canonical relationship and its own version"},"patch":{"description":"Version checks apply to the relationship. Changes append an immutable revision and one event affecting both bugs. No-ops emit nothing. Cannot remove the duplicate target of a bug still resolved as duplicate; change that resolution first. Duplicate targets are unique and cycles are rejected. Archived workspaces reject writes.","operationId":"updateRelationship","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"relationship","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchRelationship"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relationship"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Remove or restore a shared relationship using its version"}},"/api/v1/workspaces/{workspace}/relationships/{relationship}/history":{"get":{"description":"Scoped access required. Immutable lifecycle revisions, oldest first. Initial migrated relationships are marked imported, with migration time and no attributed user. Endpoints and kind never change.","operationId":"listRelationshipHistory","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}},{"in":"path","name":"relationship","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Pass next_after from the previous page. Omit for the first page. Absence of next_after means end of results.","in":"query","name":"after","schema":{"minimum":0,"type":"integer"}},{"description":"Maximum items to return.","in":"query","name":"limit","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipPage"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Fetch immutable relationship revisions"}},"/api/v1/workspaces/{workspace}/tokens":{"post":{"description":"Authority belongs to tokens, not users. Workspace admins may issue only read/write tokens in their own workspace; superadmins may also issue workspace admin tokens. Each credential has an independent role and scope even if its username matches an existing credential. mode=agent returns private Markdown; mode=browser returns a one-use link. expires_at is optional; omit it for a non-expiring agent token or browser session. Login links always expire within ten minutes. Superadmin tokens are issued only through the local CLI.","operationId":"issueCredential","parameters":[{"in":"path","name":"workspace","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCredential"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credential"}}},"description":"Success"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unsupported Media Type"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Issue scoped agent instructions or a one-time browser login link"}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://mutrack.fdold.eu"}]}
