{"openapi":"3.0.0","info":{"description":"The BugBoard issue-tracker HTTP API. It is generated from the\nGo handlers' annotations and is the contract the web app and the\nnative clients are built from. The reference is published at\nhttps://bugboard.ai/docs/api and this document at\nhttps://bugboard.ai/openapi.json.","title":"BugBoard API","termsOfService":"https://bugboard.eu","contact":{"name":"BugBoard","url":"https://bugboard.eu"},"license":{"name":"Proprietary"},"version":"1.0"},"paths":{"/account/delete":{"post":{"security":[{"BearerAuth":[]}],"description":"Permanently deletes the account after the typed email confirmation and a re-authentication (the current password, or the emailed code for an account without one). Personal data is erased; content written in shared workspaces stays, attributed to \"Deleted user\". Every session ends at once. A wrong password or code is 403 REAUTH_FAILED (not 401, which clients read as an ended session). 409 ACCOUNT_DELETION_BLOCKED lists the organizations to deal with first. Irreversible.","tags":["account"],"summary":"Delete the caller's account","operationId":"deleteAccount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.DeleteAccountRequest"}}},"description":"Typed email confirmation and password or code","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/dto.DeleteAccountResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/account/deletion-check":{"get":{"security":[{"BearerAuth":[]}],"description":"Says how the caller confirms a deletion (\"password\" or an emailed \"code\") and lists the organizations that block it (sole owner of an organization that still has members, or the only member of one that holds billing or time-tracking records). Read-only.","tags":["account"],"summary":"Check whether the account can be deleted","operationId":"checkAccountDeletion","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/dto.AccountDeletionCheck"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/account/deletion-code":{"post":{"security":[{"BearerAuth":[]}],"description":"For an account without a password: emails a 6-digit code to the account's address, valid 10 minutes. It confirms POST /account/delete and nothing else (a sign-in code cannot delete an account, and this one cannot sign in). An account with a password is refused with 400: it confirms with the password.","tags":["account"],"summary":"Email an account-deletion code","operationId":"requestAccountDeletionCode","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/dto.RequestDeletionCodeResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/account/export":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the authenticated user's personal data as a downloadable JSON file (GDPR right to access / data portability). This endpoint streams a file attachment, not the standard success envelope.","tags":["account"],"summary":"Export the caller's personal data","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UserDataExport"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/activation-emails/stop":{"post":{"description":"Public endpoint behind the \"Stop these emails\" link of the three activation emails. The token from the link is the credential. Turns off every activation email not yet sent to that user; idempotent.","tags":["support"],"summary":"Stop the activation emails","operationId":"stopActivationEmails","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.StopActivationEmailsRequest"}}},"description":"Token from the link","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/agent-consents":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the pending \"somebody wants to run work on YOUR machine\" requests addressed to the caller. Only the device owner ever sees these, and only the device owner can decide them — there is no admin override anywhere in this feature.","tags":["agents"],"summary":"The caller's consent inbox","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.AgentConsentRequest"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/agent-consents/{uuid}":{"post":{"security":[{"BearerAuth":[]}],"description":"Records the device owner's decision. ONLY the executor — the person whose machine, checkout, keys and network are involved — may decide; not an admin, not the org owner, not the requester. On approval the SAME run row is resumed (awaiting_consent is re-routed and dispatched); a child run is never inserted, because the parent still holds the requester's in-flight slot and the fallback anybody reaches for on that rejection appends the approval to the run that is waiting for it.","tags":["agents"],"summary":"Approve, deny or revoke a consent request","parameters":[{"description":"Consent request UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.DecideConsentRequest"}}},"description":"Decision","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.AgentConsentRequest"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/agent-devices":{"get":{"security":[{"BearerAuth":[]}],"description":"The org's live devices, freshest heartbeat first. Revoked devices are absent: the row is kept so the runs that executed on the machine keep pointing at it, but a revoked device is not a device anybody can act on.","tags":["agents"],"summary":"List the org's paired devices","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.AgentDevice"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Mints a device credential for the signed-in person's own machine and returns the raw secret ONCE. Enrollment CONFIRMS a device; it never authenticates one — there is no endpoint anywhere that turns an unauthenticated claim about a machine into a device row, so a human session is the only thing that can bring one into existence. The scope set must be non-empty and drawn from the closed set {read_repo, write_repo, run_tests, run_shell, network}: unlike api_tokens, an empty set is refused rather than treated as \"everything\", because what it would silently authorize is shell execution on somebody's laptop.","tags":["agents"],"summary":"Pair a machine to the caller","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.EnrollDeviceRequest"}}},"description":"Device","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/handler.EnrollDeviceResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/agent-devices/{uuid}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Ends a device immediately and totally. IMMEDIATE because every daemon route resolves its caller by secret hash on every request and that lookup rejects a revoked row — there is no cached session and no independently-lived token to wait out, and an open /daemon/connect stream closes on its next keepalive. TOTAL because revocation is stamped on the row the secret hashes to, so it applies to the credential itself rather than to something derived from it. The row is NOT deleted: the runs that executed on the machine keep pointing at it.","tags":["agents"],"summary":"Revoke a paired device","parameters":[{"description":"Device UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/agent-runs/{uuid}":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns a run's current state and both of its principals. Reachability is the run's CHANNEL — the sole authz anchor of the chat feature — so anyone who can read the conversation can see that a run happened in it.","tags":["agents"],"summary":"Read one agent run","parameters":[{"description":"Run UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/handler.AgentRunResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Stops a run and revokes its per-run credential. The requester may always stop their own; anybody else needs channel MANAGE, because cancelling somebody else's work is an administrative act rather than a participating one.","tags":["agents"],"summary":"Cancel an agent run","parameters":[{"description":"Run UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Cancelled"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/agent-runs/{uuid}/events":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the append-only tool-by-tool transcript of a run, forward from a cursor. Keyset on `seq`, never OFFSET. This — not the channel — is where the detail lives: the agent's ANSWER is posted into the conversation as a normal message, and pasting a transcript there instead would turn a channel into a log file.","tags":["agents"],"summary":"Read a run's transcript","parameters":[{"description":"Run UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Return events after this seq","name":"after","in":"query","schema":{"type":"integer"}},{"description":"Page size (max 200)","name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.AgentRunEvent"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/agents":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the agents defined in the caller's organization, by handle. An agent is a PERSONA; the identity it authors messages and holds memberships with is a linked `users` row carrying kind='agent' (migration 0039), which is why there is no avatar field here — the avatar is that user's.","tags":["agents"],"summary":"List the org's agents","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.Agent"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Mints a new agent in the caller's organization: the persona, the `users` row that carries kind='agent' and is what @mentions and authorship resolve against, and the org membership that makes it reachable (channel_access joins org_members). Requires org.manage — an agent is a PRINCIPAL whose project_scope='all' reaches every project in the org, so a member who cannot reach every project must not be able to mint one that can. It costs no seat. The logo is written to the agent's actor row, never to `agents`, which has no avatar column by design.","tags":["agents"],"summary":"Create an agent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.CreateAgentRequest"}}},"description":"Agent","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.Agent"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/agents/{uuid}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Applies a partial edit to one agent in the caller's organization. Requires org.manage: `instructions` is the standing prompt every future run executes under on behalf of whoever mentions the agent, so editing it is administration however small the diff. The handle is immutable — the actor's reserved address is derived from it. Setting projectScope to 'selected' while nothing is selected is rejected by trg_agents_project_scope at COMMIT and reported as 400.","tags":["agents"],"summary":"Update an agent","parameters":[{"description":"Agent UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.UpdateAgentRequest"}}},"description":"Changes","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.Agent"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/ai/chat":{"get":{"security":[{"BearerAuth":[]}],"tags":["ai"],"summary":"Get the AskAI history","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChatHistoryResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Appends the message to the caller's persisted thread, runs the LLM with recent context, and returns the reply.","tags":["ai"],"summary":"Send a message to AskAI","parameters":[{"description":"Chat scope (e.g. all, project:42)","name":"scope","in":"query","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.ChatRequest"}}},"description":"Message + optional page context","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/service.AIChatResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"tags":["ai"],"summary":"Clear the AskAI history","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ClearChatResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/ai/draft-comment":{"post":{"security":[{"BearerAuth":[]}],"description":"Drafts a reply to a task's discussion thread from a short transcript. One-shot — not persisted to AskAI history.","tags":["ai"],"summary":"Draft a reply comment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.DraftCommentRequest"}}},"description":"Task type + thread context","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DraftedCommentResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/ai/draft-issue":{"post":{"security":[{"BearerAuth":[]}],"description":"Best-effort: returns a refined title, markdown description, priority hint, and label suggestions. Never 500s.","tags":["ai"],"summary":"Draft a new issue from a raw title","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.DraftIssueRequest"}}},"description":"Raw title (+ optional type / project)","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/service.DraftIssueResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/ai/generate-description":{"post":{"security":[{"BearerAuth":[]}],"tags":["ai"],"summary":"Generate a task description","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.GenerateDescriptionRequest"}}},"description":"Type + current title/description","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.GeneratedDescriptionResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/ai/generate-title":{"post":{"security":[{"BearerAuth":[]}],"tags":["ai"],"summary":"Generate a task title","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.GenerateTitleRequest"}}},"description":"Type + current title/description","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.GeneratedTitleResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/attachments/{id}":{"get":{"security":[{"BearerAuth":[]}],"description":"Streams the attachment bytes (Content-Disposition: attachment). Org-scoped.","tags":["attachments"],"summary":"Download an attachment","operationId":"downloadAttachment","parameters":[{"description":"Attachment id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"tags":["attachments"],"summary":"Delete an attachment","operationId":"deleteAttachment","parameters":[{"description":"Attachment id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/attachments/{id}/signed-url":{"get":{"security":[{"BearerAuth":[]}],"description":"Mints a short-lived (15 min) HMAC-signed URL the browser can use as an <img> src or a plain link.","tags":["attachments"],"summary":"Get a signed attachment URL","operationId":"getAttachmentSignedUrl","parameters":[{"description":"Attachment id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SignedURLResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/attachments/{id}/view":{"get":{"description":"Streams the attachment inline when a valid HMAC token + expiry are presented. Public (token is the credential).","tags":["attachments"],"summary":"View a signed attachment","operationId":"viewSignedAttachment","parameters":[{"description":"Attachment id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"HMAC signature from the signed-url endpoint","name":"token","in":"query","required":true,"schema":{"type":"string"}},{"description":"Unix-seconds expiry the token was signed for","name":"exp","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/change-password":{"post":{"security":[{"BearerAuth":[]}],"description":"Changes the authenticated user's password.","tags":["auth"],"summary":"Change password","operationId":"changePassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.ChangePasswordRequest"}}},"description":"Old + new password","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/email-verification":{"post":{"security":[{"BearerAuth":[]}],"description":"Checks the code mailed by POST /auth/email-verification/code. The account keeps its password and sessions. 400 VERIFICATION_CODE_INVALID for a wrong, expired, used or exhausted code. An address already confirmed answers 200 unchanged. Rate-limited per user.","tags":["auth"],"summary":"Confirm the caller's email address","operationId":"verifyEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.VerifyEmailRequest"}}},"description":"The mailed code","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AuthUser"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/email-verification/code":{"post":{"security":[{"BearerAuth":[]}],"description":"Replaces any outstanding confirmation code of the signed-in account with a new one (10 minutes, 5 attempts) and mails it. 409 EMAIL_ALREADY_VERIFIED when the address is already confirmed. Rate-limited per user.","tags":["auth"],"summary":"Mail a code that confirms the caller's email address","operationId":"requestEmailVerification","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.EmailVerificationSentResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/forgot-password":{"post":{"description":"Emails a reset link. Always returns success to prevent email enumeration.","tags":["auth"],"summary":"Request a password reset","operationId":"forgotPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.ForgotPasswordRequest"}}},"description":"Email","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/identities":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the caller's linked provider accounts for the settings page.","tags":["auth"],"summary":"List linked social accounts","operationId":"listLinkedIdentities","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.LinkedIdentity"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/identities/{id}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Removes one linked provider account. Refused when it is the caller's only remaining way to sign in.","tags":["auth"],"summary":"Disconnect a linked social account","operationId":"unlinkIdentity","parameters":[{"description":"Identity id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/login":{"post":{"description":"Exchanges credentials for a JWT bearer token plus the user object.","tags":["auth"],"summary":"Log in with email + password","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.LoginRequest"}}},"description":"Login payload","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.LoginResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/logout":{"post":{"security":[{"BearerAuth":[]}],"description":"Invalidates the caller's bearer token AND every refresh-token chain that session backs, so a stored refresh token cannot revive it.","tags":["auth"],"summary":"Log out","operationId":"logout","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/me":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the authenticated user plus their role in the active org.","tags":["auth"],"summary":"Get the current user","operationId":"getCurrentUser","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MeResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/oauth/exchange":{"post":{"description":"Redeems the single-use ticket from the callback redirect. Same response shape as register/verify-code.","tags":["auth"],"summary":"Exchange a social sign-in ticket for a session","operationId":"exchangeOAuthTicket","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.OAuthExchangeRequest"}}},"description":"Ticket from the callback redirect","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RegisterResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/oauth/providers":{"get":{"description":"Returns the provider names this deployment has credentials for, so the sign-in screen only renders buttons that can work.","tags":["auth"],"summary":"List available social sign-in providers","operationId":"listOAuthProviders","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OAuthProvidersResponse"}}}]}}}}}}},"/auth/oauth/{provider}/callback":{"get":{"description":"Consumes the authorization code and redirects back into the app with a single-use handoff ticket. Registered as the callback URL at the provider.","tags":["auth"],"summary":"Provider redirect target","operationId":"oauthCallback","parameters":[{"description":"google or github","name":"provider","in":"path","required":true,"schema":{"type":"string"}},{"description":"Authorization code","name":"code","in":"query","schema":{"type":"string"}},{"description":"Opaque state minted by /start","name":"state","in":"query","schema":{"type":"string"}}],"responses":{"302":{"description":"Found"}}}},"/auth/oauth/{provider}/start":{"get":{"description":"Redirects the browser to the provider's consent screen. Not an API call — navigate to it.","tags":["auth"],"summary":"Begin a social sign-in","operationId":"startOAuth","parameters":[{"description":"google or github","name":"provider","in":"path","required":true,"schema":{"type":"string"}},{"description":"Same-origin path to land on afterwards, or the literal \\","name":"redirect","in":"query","schema":{"type":"string"}},{"description":"Org invite token to consume on signup","name":"invite","in":"query","schema":{"type":"string"}}],"responses":{"302":{"description":"Found"}}}},"/auth/refresh":{"post":{"security":[{"BearerAuth":[]}],"description":"Issues a fresh token for the current session, extending it by a full expiry window.","tags":["auth"],"summary":"Refresh the session token","operationId":"refreshSession","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RefreshResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/refresh-token":{"post":{"description":"Public. Exchanges a refresh token for a fresh access token plus its successor refresh token (rotation). Presenting an already-spent token destroys the whole chain — it is treated as a leak.","tags":["auth"],"summary":"Redeem a refresh token for a new session","operationId":"redeemRefreshToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.RefreshTokenRequest"}}},"description":"Refresh token issued at login","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RefreshTokenResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/register":{"post":{"description":"Creates a user. With an inviteToken the user joins the inviting org; otherwise a new org is created with the user as owner.","tags":["auth"],"summary":"Register a new user","operationId":"register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.RegisterRequest"}}},"description":"Registration payload","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RegisterResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/request-code":{"post":{"description":"Emails a 6-digit login code. Always returns {sent:true} — never reveals whether the email has an account.","tags":["auth"],"summary":"Request a passwordless login code","operationId":"requestLoginCode","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.RequestCodeRequest"}}},"description":"Email to send the code to","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RequestCodeResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/reset-password":{"post":{"description":"Sets a new password given a valid reset token.","tags":["auth"],"summary":"Reset a password with a token","operationId":"resetPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.ResetPasswordRequest"}}},"description":"Reset token + new password","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/token":{"post":{"security":[{"BearerAuth":[]}],"description":"Mints a personal API token scoped to the caller's active org. The raw token is returned once.","tags":["auth"],"summary":"Create an API token","operationId":"createApiToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.CreateAPITokenRequest"}}},"description":"Token name + optional expiry","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.APITokenCreatedResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/tokens":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the caller's API tokens (safe projection — never the raw token or hash).","tags":["auth"],"summary":"List API tokens","operationId":"listApiTokens","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.APITokenListItem"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/tokens/{id}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Revokes one of the caller's API tokens.","tags":["auth"],"summary":"Delete an API token","operationId":"deleteApiToken","parameters":[{"description":"Token id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/auth/verify-code":{"post":{"description":"Exchanges an emailed 6-digit code for a session. First-time emails get an account + default org. Same shape as register.","tags":["auth"],"summary":"Verify a passwordless login code","operationId":"verifyLoginCode","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.VerifyCodeRequest"}}},"description":"Email + code","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RegisterResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/billing/checkout":{"post":{"security":[{"BearerAuth":[]}],"description":"Creates a Stripe checkout session for the requested plan and returns its URL. Org owner or admin only.","tags":["billing"],"summary":"Create a Stripe checkout session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateCheckoutRequest"}}},"description":"Plan to check out","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/dto.CheckoutResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/billing/plans":{"get":{"description":"Returns the flat pricing tiers with EUR converted from a live USD→EUR rate (Frankfurter/ECB, cached). Public — the marketing pricing page renders these without auth.","tags":["billing"],"summary":"List pricing tiers","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.PlanTier"}}}}]}}}}}}},"/billing/portal":{"post":{"security":[{"BearerAuth":[]}],"description":"Creates a Stripe billing portal session for the org and returns its URL. Org owner or admin only.","tags":["billing"],"summary":"Create a Stripe billing portal session","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/dto.PortalResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/billing/subscription":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the org's real subscription status (plan, status, current period end, cancel-at-period-end, Stripe customer id). Org owner or admin only.","tags":["billing"],"summary":"Get the org's subscription","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/dto.SubscriptionResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/billing/trial":{"post":{"security":[{"BearerAuth":[]}],"description":"Puts a Free organization on the Starter plan for 14 days with no card, then reverts it to Free automatically unless it has paid by then. Once per organization, and only for an owner or admin. Once per organization and once per verified email address: refused with 403 EMAIL_NOT_VERIFIED if the caller never confirmed their address, and with 409 if the address already used a trial in any organization (TRIAL_CLAIMED), if the org already used its trial (TRIAL_ALREADY_USED), has one running (TRIAL_ACTIVE), or is not on Free (TRIAL_NOT_FREE, ALREADY_SUBSCRIBED). Send an Idempotency-Key header to make a retry replay the first answer.","tags":["billing"],"summary":"Start the org's free trial","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.StartTrialResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/billing/usage":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the org's current plan, its live use of each plan limit (seats, projects, storage) next to the limit enforcement applies (-1 = unlimited), and its trial state. trialAvailable says whether POST /billing/trial would start a trial now.","tags":["billing"],"summary":"Get the org's plan usage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.UsageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}":{"get":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of GET /tasks/{id}. Use /api/v1/tasks/{id}.","tags":["tasks"],"summary":"[Deprecated] Get a task by id via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskDetail"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"patch":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of PATCH /tasks/{id}. Use /api/v1/tasks/{id}.","tags":["tasks"],"summary":"[Deprecated] Update a task via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/dto.UpdateTaskRequest"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskDetail"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of DELETE /tasks/{id}. Use /api/v1/tasks/{id}.","tags":["tasks"],"summary":"[Deprecated] Delete a task via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeleteResult"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/agent-build":{"post":{"security":[{"BearerAuth":[]}],"description":"Kicks off an external coding-agent run for the bug and returns the run id + status.","tags":["coding-agent"],"summary":"Start a coding-agent build for a bug","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Optional branch + prompt overrides"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AgentBuildResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"502":{"description":"Bad Gateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/agent-build/cancel":{"post":{"security":[{"BearerAuth":[]}],"description":"Cancels the latest coding-agent run for the bug. Idempotent — a bug with no run still returns ok.","tags":["coding-agent"],"summary":"Cancel a bug's coding-agent build","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AgentCancelResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"502":{"description":"Bad Gateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/attachments":{"get":{"security":[{"BearerAuth":[]}],"tags":["attachments"],"summary":"List a bug's attachments","operationId":"listBugAttachments","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.AttachmentResponse"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"tags":["attachments"],"summary":"Upload an attachment to a bug","operationId":"uploadBugAttachment","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/uploadBugAttachment"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AttachmentResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/comments":{"get":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of GET /tasks/{id}/comments. Use /api/v1/tasks/{id}/comments.","tags":["comments"],"summary":"[Deprecated] List a task's comments via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.CommentWithUser"}}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of POST /tasks/{id}/comments. Use /api/v1/tasks/{id}/comments.","tags":["comments"],"summary":"[Deprecated] Add a comment via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/apimodel.CreateCommentRequest"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CommentWithUser"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/history":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the activity log for a single bug (feat-6). Readable by any member who can read the parent task.","tags":["logs"],"summary":"Get a bug's activity history","parameters":[{"description":"Bug ID","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.LogWithUser"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/repositories":{"get":{"security":[{"BearerAuth":[]}],"tags":["repositories"],"summary":"List a bug's attached repositories","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.BugRepoWithRepo"}}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"put":{"security":[{"BearerAuth":[]}],"description":"Atomically replaces the full set of repos attached to a bug. Every repo must be in the bug's org.","tags":["repositories"],"summary":"Replace a bug's repository set","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.PutBugRepositoriesRequest"}}},"description":"Repository ids to attach","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OKCountResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/repositories/{repoId}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Single-column update on the bug_repositories join row — today only prStatus (e.g. mark a branch-only push manually merged).","tags":["repositories"],"summary":"Update a bug↔repository link","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Repository id","name":"repoId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.UpdateBugRepoRequest"}}},"description":"New prStatus","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OKResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/requesters":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the projects that have marked this bug as \"we want this too\".","tags":["task-requesters"],"summary":"List a bug's requesters","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.RequesterProject"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"put":{"security":[{"BearerAuth":[]}],"description":"Replaces the full requester set for a bug. Every project id must belong to the caller's org. Returns the persisted set.","tags":["task-requesters"],"summary":"Replace a bug's requesters","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/apimodel.SetRequestersRequest"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.RequesterProject"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/tags":{"get":{"security":[{"BearerAuth":[]}],"tags":["tags"],"summary":"List a bug's tags","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/domain.Tag"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/bugs/{id}/tags/{tagId}":{"post":{"security":[{"BearerAuth":[]}],"description":"Idempotent: 204 also when the task already has the tag. A task of any type is accepted. 403 when the task is not in the tag's project (another project, another org or no such task), 404 when the tag does not exist.","tags":["tags"],"summary":"Add a tag to a bug","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Tag id","name":"tagId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"attached"},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Idempotent: 204 also when the task did not have the tag. A task of any type is accepted. 403 when the task is not in the tag's project (another project, another org or no such task), 404 when the tag does not exist.","tags":["tags"],"summary":"Remove a tag from a bug","parameters":[{"description":"Bug id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Tag id","name":"tagId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"detached"},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/calendar/{token}":{"get":{"description":"Emits the RFC 5545 .ics document for a subscribe token. Public — the token is the credential.","tags":["calendar"],"summary":"Get a project's iCalendar feed","parameters":[{"description":"Calendar subscribe token (optionally suffixed .ics)","name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"iCalendar (text/calendar) document","content":{"text/calendar":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"text/calendar":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"text/calendar":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Moves, resizes, recolors, or edits a card's text/body/html. Only the provided fields change.","tags":["canvas"],"summary":"Update a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/Body"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CanvasCard"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Deletes a card and cascades its edges + comments.","tags":["canvas"],"summary":"Delete a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeletedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/assign":{"post":{"security":[{"BearerAuth":[]}],"description":"Sets the card's assignee; a 0 or null assigneeId clears it.","tags":["canvas"],"summary":"Assign (or clear) a canvas card's owner","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Assignee id","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CanvasCard"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/comments":{"get":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"List a canvas card's comments","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.CanvasComment"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"Add a comment to a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Comment body (and optional images)","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CanvasComment"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/detail":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns one card with its assignee, tags, linked tasks, and people resolved.","tags":["canvas"],"summary":"Get a canvas card's detail","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/service.CanvasCardDetail"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/people":{"get":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"List the people on a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.MemberUser"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"Add a person to a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"User id","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AddedResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/people/{userId}":{"delete":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"Remove a person from a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"User id","name":"userId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RemovedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/promote":{"post":{"security":[{"BearerAuth":[]}],"description":"Graduates a card into a real task (bug/feature/change) and flips it to a task_ref.","tags":["canvas"],"summary":"Promote a canvas card to a task","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Task type"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CanvasCard"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/tags/{tagId}":{"post":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"Add a tag to a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Tag id","name":"tagId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CanvasCard"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"Remove a tag from a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Tag id","name":"tagId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CanvasCard"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/tasks":{"get":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"List a canvas card's linked tasks","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.Task"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"Link a task to a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/Body2"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.LinkedResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/tasks/{taskId}":{"delete":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"Unlink a task from a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Task id","name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.UnlinkedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/cards/{id}/vote":{"post":{"security":[{"BearerAuth":[]}],"description":"Applies a ±1 vote delta to the card (defaults to +1).","tags":["canvas"],"summary":"Vote on a canvas card","parameters":[{"description":"Canvas card id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Vote delta"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CanvasCard"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/comments/{id}":{"delete":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"Delete a canvas comment","parameters":[{"description":"Canvas comment id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeletedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/canvas/edges/{id}":{"delete":{"security":[{"BearerAuth":[]}],"tags":["canvas"],"summary":"Delete a canvas edge","parameters":[{"description":"Canvas edge id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeletedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/changes/{id}/attachments":{"get":{"security":[{"BearerAuth":[]}],"tags":["attachments"],"summary":"List a change's attachments","operationId":"listChangeAttachments","parameters":[{"description":"Change (task) id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.AttachmentResponse"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"tags":["attachments"],"summary":"Upload an attachment to a change","operationId":"uploadChangeAttachment","parameters":[{"description":"Change (task) id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/uploadBugAttachment"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AttachmentResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the caller's channel dock: standalone channels, project channels and direct messages, each with the caller's own unread and pin state and its `topicsMoved` badge — a count of TOPICS whose head is ahead of the caller's per-topic watermark (\"2 topics\", never \"47\"), with muted topics excluded. Archived channels are omitted. Ordered pinned-first, then by most recent activity.","tags":["channels"],"summary":"List the caller's conversations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.ChannelResponse"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Creates a named, org-wide channel and makes the caller its admin. `visibility` is \"public\" (reachable by every non-guest org member) or \"private\" (explicit members only); it defaults to public — those are the only two values. Names are unique per organization, case-insensitively. Guests may not create channels.","tags":["channels"],"summary":"Create a standalone channel","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateChannelRequest"}}},"description":"Channel payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns a single conversation with the caller's access, unread and pin state, AND its topic tabs in `topics` — the tab bar the client renders across the top, with \"All\" implied rather than listed. A channel that exists in the caller's organization but that they cannot reach answers 403; one that does not exist answers 404. Archived channels are readable here even though they are absent from the list.","tags":["channels"],"summary":"Get one channel","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"patch":{"security":[{"BearerAuth":[]}],"description":"Partially updates a channel. Requires channel-manage authority. `name` and `topic` are accepted only on standalone channels — a project conversation takes its identity from its project, and a DM from its participants. `archived` is accepted on every kind.","tags":["channels"],"summary":"Rename, re-topic or archive a channel","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateChannelRequest"}}},"description":"Fields to update","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/agent-runs":{"post":{"security":[{"BearerAuth":[]}],"description":"Turns an @agent mention into a run and routes it. Routing starts at tier 0 (server-side, read-only, no daemon) on EVERY turn and only descends when the ask actually needs a checkout. The caller must be able to WRITE in the channel — invoking an agent puts a message into the conversation — and the agent's own actor row must independently be able to reach it, so a person cannot summon an agent into a conversation it was never invited to. At most one run per (channel, requester) is in flight at a time; a second returns 409, which is NOT \"the agent is busy\" — somebody else's run in the same channel is expected and allowed.","tags":["agents"],"summary":"Invoke an agent in a channel","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.InvokeAgentRequest"}}},"description":"Invocation","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/handler.AgentRunResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/attachments":{"post":{"security":[{"BearerAuth":[]}],"description":"Stores a file against the channel and returns its uuid. The file carries NO message yet — send one naming the uuid in `attachmentUuids` to attach it. This two-phase shape is deliberate: it keeps a slow upload from holding the message hostage, lets the client show per-file progress before the user commits to sending, and stops a retried send from re-uploading bytes that already landed. Requires WRITE access to the channel: an attachment is a contribution to the conversation, not a read of it. An upload nobody sends is swept after two hours. Accepts the same types as task attachments (jpeg/png/gif/webp/pdf/txt), validated by extension, declared MIME type AND a magic-byte sniff of the real content.","tags":["chat"],"summary":"Upload a file to a channel","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/uploadBugAttachment"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageAttachment"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"507":{"description":"Insufficient Storage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/attachments/{attachmentUuid}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Deletes a file the caller uploaded but has not sent yet — the \"x\" on an attachment chip in the composer. Only the UPLOADER may call it, and only while the file is unsent: once a message carries the attachment, removing it is an edit of that message. Returns 409 in that case.","tags":["chat"],"summary":"Remove an unsent upload","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Attachment uuid","name":"attachmentUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/attachments/{attachmentUuid}/signed-url":{"get":{"security":[{"BearerAuth":[]}],"description":"Mints a short-lived, signed URL for the attachment's bytes. Needed because an `<img src>` cannot send an Authorization header, so the capability has to travel in the URL instead. Valid for 15 minutes and re-mintable; the authorization is checked HERE, at mint time, which is the only place it can be — the view route itself has no session. Requires only READ access, unlike uploading.","tags":["chat"],"summary":"Get a viewable URL for a chat attachment","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Attachment uuid","name":"attachmentUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SignedURLResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/members":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns WHO is in this conversation. People and agents come back in ONE list, in the same shape, distinguished only by `kind` — an agent in a channel is a member of it, not a different sort of thing that sits beside the members. Requires read access, because attributing a bubble and knowing which agent can be mentioned here are both part of reading the conversation.","tags":["channels"],"summary":"List a channel's members","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/repository.ChannelActor"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Adds a human or an agent — the same endpoint for both, because an agent is a users row with kind='agent' and the capability flags are properties of the membership rather than of the actor. Requires channel-manage authority. The target must be a live member of the caller's organization. On a private channel a `historyFrom` floor is stamped, so joining does not expose what was said before. Direct-message membership is immutable and is rejected here.","tags":["channels"],"summary":"Add a member to a channel","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.AddChannelMemberRequest"}}},"description":"Member payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelMemberResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/members/available":{"get":{"security":[{"BearerAuth":[]}],"description":"The org's live actors — people and agents, one list — who are not already members. Requires channel-manage authority: enumerating an organization's addresses is not something being in a conversation entitles you to, and the only reason to read this list is to add somebody from it. A direct message returns an empty list, because its membership is its identity and nobody can be added to it.","tags":["channels"],"summary":"List the actors that can be added to a channel","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/repository.ChannelActor"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/members/{userUuid}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Revokes a membership. Requires channel-manage authority. The row is tombstoned rather than deleted, so a re-add keeps the member's history floor and \"who was in this channel in March\" stays answerable. Direct-message membership is immutable and is rejected here.","tags":["channels"],"summary":"Remove a member from a channel","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Member's user UUID","name":"userUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RemovedResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/messages":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns one keyset page of the conversation. `?before=` walks BACKWARDS and returns NEWEST FIRST; `?after=` walks FORWARDS and returns OLDEST FIRST. They are mirrors over the same stream and the same cursor, and supplying both is a 400 — a page cannot walk two directions. With neither, you get the newest page. Follow `nextBefore` / `nextAfter` respectively. There is no offset paging: the cursor is the per-channel `seq`, so a page boundary cannot shift when somebody posts mid-scroll. Tombstoned messages ARE returned (with an empty body) so the cursor stays dense — which is what makes `?after=` usable as \"everything I missed since seq N\", including the chat.resync range the live stream names. A message whose stored body the server cannot decrypt is likewise returned, with an empty `body` and `bodyUnreadable: true`, and all of its unencrypted metadata intact — one such row does not fail the page, and the client must render it as \"cannot be read\" rather than as an empty message (an empty `body` alone is ordinary: an attachment-only message has one). `?topic=` narrows this SAME stream to one tab — a topic page is a subset of the unfiltered page over the same seq range, and the cursor means the same thing either way. Each message carries `topicUuid` so the client can render its topic chip even in the All tab; a message tagged with an archived topic reports \"\" and stays in the stream.","tags":["chat"],"summary":"Read a channel's messages","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Return messages with seq strictly below this, newest first. Omit for the newest page. Mutually exclusive with after.","name":"before","in":"query","schema":{"type":"integer"}},{"description":"Return messages with seq strictly above this, oldest first. Mutually exclusive with before.","name":"after","in":"query","schema":{"type":"integer"}},{"description":"Page size (default 50, max 199)","name":"limit","in":"query","schema":{"type":"integer"}},{"description":"Topic uuid. Filters this same stream to one tab; omit for the All tab.","name":"topic","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelMessagePage"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Appends a message to the channel. `uuid` in the body is REQUIRED and must be a client-minted UUIDv7 — it is the idempotency key, so re-sending the same uuid returns the stored message instead of creating a second one. `topicUuid` optionally TAGS the message with one of the channel's topics (the client sends the active tab; tagging is optional and an untagged message is normal). `replyToUuid` optionally quotes another message IN THE SAME CHANNEL — it is a pointer rendered as an inline quoted bubble, never a thread. Any `@BUG-241` style reference in the body creates a backlink on that task and notifies its assignees, regardless of topic or mute.","tags":["chat"],"summary":"Send a message to a channel","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.SendMessageRequest"}}},"description":"Message payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelMessage"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/messages/{messageUuid}/reactions":{"post":{"security":[{"BearerAuth":[]}],"description":"Adds the caller's emoji to a message. IDEMPOTENT — reacting twice with the same emoji is a no-op, not an error, because the client has already drawn the pill as pressed. `emoji` is a SHORTCODE (`thumbsup`, `+1`, `shipit`), with or without surrounding colons; unicode glyphs are refused because skin-tone modifiers and variation selectors make them non-comparable, which would split one reaction into two piles. Requires write access to the channel: a reaction renders under your name, so it is a contribution rather than a read.","tags":["chat"],"summary":"React to a message","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Message uuid","name":"messageUuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.ReactionRequest"}}},"description":"Emoji shortcode","required":true},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/messages/{messageUuid}/reactions/{emoji}":{"get":{"security":[{"BearerAuth":[]}],"description":"Lists the user uuids behind one pill, oldest first, capped. This is the TOOLTIP's data and is deliberately not included in the message page: one popular message would otherwise put hundreds of uuids into a response that fifty messages share. Requires only read access, unlike reacting itself.","tags":["chat"],"summary":"Who reacted with one emoji","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Message uuid","name":"messageUuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Emoji shortcode","name":"emoji","in":"path","required":true,"schema":{"type":"string"}},{"description":"Max names (default 50, max 200)","name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ReactorsResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Removes the caller's emoji from a message. IDEMPOTENT — removing one that is not there is a no-op. Only ever removes the CALLER's own reaction; there is no way to clear someone else's.","tags":["chat"],"summary":"Withdraw a reaction","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Message uuid","name":"messageUuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Emoji shortcode","name":"emoji","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/pin":{"post":{"security":[{"BearerAuth":[]}],"description":"Sets the caller's own pin, which floats the channel to the top of the dock. Invisible to everyone else. Requires only read access.","tags":["channels"],"summary":"Pin or unpin a channel for the caller","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.PinChannelRequest"}}},"description":"Pin state","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/presence":{"get":{"security":[{"BearerAuth":[]}],"description":"Resolves presence for everyone in one channel, as of a single instant. Members with no presence row are returned as `offline` — never having connected is a real answer, not missing data, which is what keeps presence from needing one row per user per deployment.","tags":["chat"],"summary":"Presence for a channel's members","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.PresenceResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/read":{"post":{"security":[{"BearerAuth":[]}],"description":"Moves the caller's cursor for this channel to `seq` — the per-channel message sequence, not a timestamp or a message id. The advance is monotonic: a sequence at or below the stored one is accepted and changes nothing, because two of the caller's devices reading the same channel race by design and the slower one must not un-read what the faster one read. A genuine advance clears the channel's mention badge. Requires only read access.","tags":["channels"],"summary":"Advance the caller's read watermark","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.MarkChannelReadRequest"}}},"description":"Watermark","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/task-refs":{"get":{"security":[{"BearerAuth":[]}],"description":"Turns a batch of task references into the live chips a client renders inside message bodies: current title, current status, and everyone assigned. The unit is a PAGE OF MESSAGES, not a single reference — a client parses every reference out of the page it is about to render and asks once. Resolution is identical to the rule the send path used when it decided whether to write a backlink: scoped to this channel's project when it has one, widened to the org when it does not (a standalone channel or a DM), and an org-wide reference that matches in two projects resolves to NOTHING rather than guessing. A reference that resolves to nothing is simply ABSENT from the response — it is ordinary prose, not an error, and the client leaves the author's text alone. Authorization is the CHANNEL, so this can never be used to read a task's title through a conversation the caller cannot open.","tags":["chat"],"summary":"Resolve @BUG-241 references in a channel","parameters":[{"description":"Channel uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Comma-separated references, e.g. `BUG-241,FEAT-3`. A leading `@` is accepted. Case-insensitive. Maximum 100 per call — chunk a larger page.","name":"refs","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TaskAnchor"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/channels/{uuid}/topics":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the channel's tab bar: its live topics in explicit `position` order, each with the caller's own read watermark and mute state. The \"All\" tab is NOT in this list — it is the absence of a filter rather than a topic row, so the client renders it itself. Requires read access to the channel; there is no per-topic permission, because a topic is a lane and not an access boundary.","tags":["topics"],"summary":"List a channel's topic tabs","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TopicResponse"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Adds a lane to the channel's tab bar. Requires channel-MANAGE authority, because the tab bar is shared surface that every member then sees — unlike mute and read, which are private. A channel may hold at most 12 live topics; the 13th is refused with 409 and the caller's remedy is to archive one. Names are unique per channel, case-insensitively, and the new topic is placed at the end of the bar. Topics are never created automatically — not per task, not per bug, not per release.","tags":["topics"],"summary":"Create a topic in a channel","parameters":[{"description":"Channel UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateTopicRequest"}}},"description":"Topic payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TopicResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/chat-attachments/{uuid}/view":{"get":{"description":"Serves the bytes to a caller holding a token minted by the signed-url endpoint. No session is required or consulted — the token is the capability, and it expires in 15 minutes.","tags":["chat"],"summary":"Stream a chat attachment (signed)","parameters":[{"description":"Attachment uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"description":"Signature from the signed-url endpoint","name":"token","in":"query","required":true,"schema":{"type":"string"}},{"description":"Expiry from the signed-url endpoint","name":"exp","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/chat/conversations":{"get":{"security":[{"BearerAuth":[]}],"description":"One row per project in the caller's org, with the project's rolled-up unread count (General + every task thread). Unread rows first, most unread first; the rest by most-recent activity.","tags":["chat"],"summary":"List the messenger inbox","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ConversationsResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/chat/notification-preferences":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the account-wide default plus every per-channel override, keyed by channel uuid. `levels` names the vocabulary this build accepts so the settings UI does not carry a duplicate copy. Levels are `mentions` (notify me when someone @-mentions me here) and `none` (mute). There is deliberately no \"all messages\" level — nothing in this build writes a notification for a message that does not mention you, so it would be a setting that changes nothing.","tags":["chat"],"summary":"The caller's chat notification preferences","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChatNotificationPrefsResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"put":{"security":[{"BearerAuth":[]}],"description":"Sets the level applied to every conversation the caller has not overridden. `none` mutes chat wholesale — conversations opted back in individually still notify. Takes effect on the next inbox read; muting does not delete anything, so un-muting restores the history.","tags":["chat"],"summary":"Set the caller's default chat notification level","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.ChatNotificationDefaultRequest"}}},"description":"Level","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChatNotificationPrefsResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/chat/notification-preferences/{channelUuid}":{"put":{"security":[{"BearerAuth":[]}],"description":"Sets `mentions` or `none` for a single channel, overriding the account default. Requires read access to the channel — muting a uuid you cannot reach is refused rather than stored, so this endpoint cannot be used to test whether a private channel or DM exists.","tags":["chat"],"summary":"Override one conversation's notification level","parameters":[{"description":"Channel uuid","name":"channelUuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.ChatNotificationChannelRequest"}}},"description":"Level","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChatNotificationPrefsResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Removes the per-channel override so the conversation follows the account default again. Idempotent — clearing an override that is not there succeeds, because the requested state already holds.","tags":["chat"],"summary":"Drop one conversation's override","parameters":[{"description":"Channel uuid","name":"channelUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChatNotificationPrefsResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/chat/read":{"post":{"security":[{"BearerAuth":[]}],"description":"Clears the caller's unread notifications for a project (and optionally a specific task thread).","tags":["chat"],"summary":"Mark a chat conversation read","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ChatMarkReadRequest"}}},"description":"Project (+ optional task number)","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MarkedResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/comments/{id}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Updates a comment's content, snapshots the prior body to edit history, and fans out newly-added @mention notifications.","tags":["comments"],"summary":"Edit a comment","operationId":"updateComment","parameters":[{"description":"Comment id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.CreateCommentRequest"}}},"description":"New comment content","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.CommentUpdateResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Permanently deletes a comment. Author-only (org owners/admins may remove any comment).","tags":["comments"],"summary":"Delete a comment","operationId":"deleteComment","parameters":[{"description":"Comment id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/comments/{id}/edits":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the edit-history snapshots for a comment, oldest first. Visible to org members of the comment's parent task.","tags":["comments"],"summary":"List a comment's edit history","operationId":"listCommentEdits","parameters":[{"description":"Comment id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.CommentEdit"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/contact":{"post":{"description":"Public endpoint that emails a contact-form message to the BugBoard team.","tags":["support"],"summary":"Submit the contact form","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.ContactRequest"}}},"description":"Contact form payload","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/dashboard/today":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the scored recommended projects + focus tasks for the caller, computed relative to \"today\" in the given IANA timezone (empty => UTC).","tags":["dashboard"],"summary":"Get the Today list","parameters":[{"description":"IANA timezone (e.g. Europe/Athens); empty => UTC","name":"tz","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/service.TodayResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/dashboard/today/snooze":{"post":{"security":[{"BearerAuth":[]}],"description":"Hides a task from the caller's Today list for the rest of their local day. Body: { taskId, tz }.","tags":["dashboard"],"summary":"Snooze a task off Today","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Body with taskId and tz","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SnoozeResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/dashboard/top-tasks":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the caller's unfinished tasks across the org — assigned, created, subscribed to, or recently commented on — ranked by involvement strength and recent activity. Counts cover the whole involved set, not just the returned rows.","tags":["dashboard"],"summary":"Get the caller's top tasks","parameters":[{"description":"IANA timezone (e.g. Europe/Athens); empty => UTC","name":"tz","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/service.TopTasksResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/dms":{"post":{"security":[{"BearerAuth":[]}],"description":"Returns the conversation for a participant SET, creating it on first use. The caller is always a participant; `participantUuids` lists the others and may safely repeat the caller. Order does not matter and duplicates are collapsed — the same set of people always resolves to the same conversation, so this endpoint is idempotent. Between 2 and 9 participants including the caller. Membership is immutable: to add someone, open a new conversation with the larger set.","tags":["channels"],"summary":"Open or return a direct message","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.OpenDMRequest"}}},"description":"Participants","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/features/{id}":{"get":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of GET /tasks/{id}. Use /api/v1/tasks/{id}.","tags":["tasks"],"summary":"[Deprecated] Get a task by id via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskDetail"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"patch":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of PATCH /tasks/{id}. Use /api/v1/tasks/{id}.","tags":["tasks"],"summary":"[Deprecated] Update a task via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/dto.UpdateTaskRequest"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskDetail"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of DELETE /tasks/{id}. Use /api/v1/tasks/{id}.","tags":["tasks"],"summary":"[Deprecated] Delete a task via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeleteResult"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/features/{id}/attachments":{"get":{"security":[{"BearerAuth":[]}],"tags":["attachments"],"summary":"List a feature's attachments","operationId":"listFeatureAttachments","parameters":[{"description":"Feature id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.AttachmentResponse"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"tags":["attachments"],"summary":"Upload an attachment to a feature","operationId":"uploadFeatureAttachment","parameters":[{"description":"Feature id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/uploadBugAttachment"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AttachmentResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/features/{id}/comments":{"get":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of GET /tasks/{id}/comments. Use /api/v1/tasks/{id}/comments.","tags":["comments"],"summary":"[Deprecated] List a task's comments via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.CommentWithUser"}}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Deprecated alias of POST /tasks/{id}/comments. Use /api/v1/tasks/{id}/comments.","tags":["comments"],"summary":"[Deprecated] Add a comment via the legacy bug/feature path","deprecated":true,"parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/apimodel.CreateCommentRequest"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CommentWithUser"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/features/{id}/history":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the activity log for a single feature (feat-6). Readable by any member who can read the parent task.","tags":["logs"],"summary":"Get a feature's activity history","parameters":[{"description":"Feature ID","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.LogWithUser"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/features/{id}/requesters":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the projects that have marked this feature as \"we want this too\".","tags":["task-requesters"],"summary":"List a feature's requesters","parameters":[{"description":"Feature id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.RequesterProject"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"put":{"security":[{"BearerAuth":[]}],"description":"Replaces the full requester set for a feature. Every project id must belong to the caller's org. Returns the persisted set.","tags":["task-requesters"],"summary":"Replace a feature's requesters","parameters":[{"description":"Feature id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/apimodel.SetRequestersRequest"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.RequesterProject"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/features/{id}/tags":{"get":{"security":[{"BearerAuth":[]}],"tags":["tags"],"summary":"List a feature's tags","parameters":[{"description":"Feature id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/domain.Tag"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/features/{id}/tags/{tagId}":{"post":{"security":[{"BearerAuth":[]}],"description":"Idempotent: 204 also when the task already has the tag. A task of any type is accepted. 403 when the task is not in the tag's project (another project, another org or no such task), 404 when the tag does not exist.","tags":["tags"],"summary":"Add a tag to a feature","parameters":[{"description":"Feature id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Tag id","name":"tagId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"attached"},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Idempotent: 204 also when the task did not have the tag. A task of any type is accepted. 403 when the task is not in the tag's project (another project, another org or no such task), 404 when the tag does not exist.","tags":["tags"],"summary":"Remove a tag from a feature","parameters":[{"description":"Feature id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Tag id","name":"tagId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"detached"},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/imports":{"get":{"security":[{"BearerAuth":[]}],"tags":["imports"],"summary":"List imports","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.Envelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"tags":["imports"],"summary":"Start an import","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.StartImportRequest"}}},"description":"Source and credential","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.Envelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/imports/file":{"post":{"security":[{"BearerAuth":[]}],"tags":["imports"],"summary":"Start an import from a board export file","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.StartImportFileRequest"}}},"description":"The stored file's token","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.Envelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/imports/sources":{"get":{"security":[{"BearerAuth":[]}],"tags":["imports"],"summary":"List available import sources","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.Envelope"}}}}}}},"/imports/{id}":{"get":{"security":[{"BearerAuth":[]}],"tags":["imports"],"summary":"Get an import","parameters":[{"description":"Import ID","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.Envelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/imports/{id}/cancel":{"post":{"security":[{"BearerAuth":[]}],"tags":["imports"],"summary":"Cancel an import","parameters":[{"description":"Import ID","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/imports/{id}/events":{"get":{"security":[{"BearerAuth":[]}],"tags":["imports"],"summary":"Stream import progress","parameters":[{"description":"Import ID","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/imports/{id}/mapping":{"post":{"security":[{"BearerAuth":[]}],"tags":["imports"],"summary":"Apply import mapping and begin writing","parameters":[{"description":"Import ID","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/domain.ImportOptions"}}},"description":"Mapping decisions","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.Envelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/initiatives":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the org's initiatives, optionally narrowed by project, owner, status, and date window. Unknown filters are ignored.","tags":["initiatives"],"summary":"List initiatives","parameters":[{"description":"Filter by project id","name":"projectId","in":"query","schema":{"type":"integer"}},{"description":"Filter by owner user id","name":"ownerId","in":"query","schema":{"type":"integer"}},{"description":"Filter by status","name":"status","in":"query","schema":{"type":"string","enum":["planned","active","at_risk","shipped","cancelled"]}},{"description":"Window start (RFC3339)","name":"from","in":"query","schema":{"type":"string"}},{"description":"Window end (RFC3339)","name":"to","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.InitiativeResponse"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Creates a roadmap initiative. Required: title, status, startsAt, endsAt.","tags":["initiatives"],"summary":"Create an initiative","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Initiative payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.InitiativeResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/initiatives/{id}":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the initiative including owner and linked tasks when hydrated.","tags":["initiatives"],"summary":"Get an initiative by id","parameters":[{"description":"Initiative id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.InitiativeResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"patch":{"security":[{"BearerAuth":[]}],"description":"Partially updates an initiative. Nullable FKs (projectId, ownerId) accept explicit null to clear the column.","tags":["initiatives"],"summary":"Update an initiative","parameters":[{"description":"Initiative id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/Body"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.InitiativeResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Deletes an initiative and returns a deleted flag.","tags":["initiatives"],"summary":"Delete an initiative","parameters":[{"description":"Initiative id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeletedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/initiatives/{id}/issues":{"post":{"security":[{"BearerAuth":[]}],"description":"Links a task under an initiative. Idempotent — succeeds even if the link already existed.","tags":["initiatives"],"summary":"Link a task to an initiative","parameters":[{"description":"Initiative id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Body with taskId","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.LinkedResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/initiatives/{id}/issues/{taskId}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Removes a task's link to an initiative and returns an unlinked flag.","tags":["initiatives"],"summary":"Unlink a task from an initiative","parameters":[{"description":"Initiative id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Task id","name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.UnlinkedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/invites/by-id/{id}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Authenticated decline for the /invites/pending list. The server matches the invite's email to the caller's.","tags":["organizations"],"summary":"Decline a pending invite by id","parameters":[{"description":"Invite id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/invites/by-id/{id}/accept":{"post":{"security":[{"BearerAuth":[]}],"description":"Authenticated accept for the /invites/pending list. The server matches the invite's email to the caller's.","tags":["organizations"],"summary":"Accept a pending invite by id","parameters":[{"description":"Invite id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AcceptInviteResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/invites/pending":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns pending invitations addressed to the authenticated user's email.","tags":["organizations"],"summary":"List the caller's pending invites","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/dto.PendingInvite"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/invites/{token}":{"get":{"description":"Public endpoint returning the invite's role, expiry, and org name. Deliberately omits the invitee email.","tags":["organizations"],"summary":"Get public invite info by token","parameters":[{"description":"Invite token","name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.InviteInfo"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"description":"Public invitee-side reject. Possession of the plaintext token is the proof.","tags":["organizations"],"summary":"Decline an invite by token","parameters":[{"description":"Invite token","name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/invites/{token}/accept":{"post":{"security":[{"BearerAuth":[]}],"description":"Authenticated accept via the URL-supplied plaintext token.","tags":["organizations"],"summary":"Accept an invite by token","parameters":[{"description":"Invite token","name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AcceptInviteResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/logs":{"get":{"security":[{"BearerAuth":[]}],"description":"Admin-only. Returns the org-wide activity stream (who did what across every project), keyset-paginated and filterable.","tags":["logs"],"summary":"List organization activity logs","parameters":[{"description":"Max rows to return (default 50, capped at 100)","name":"limit","in":"query","schema":{"type":"integer"}},{"description":"Opaque cursor from the previous page's meta.nextCursor","name":"cursor","in":"query","schema":{"type":"string"}},{"description":"Filter by actor (user id)","name":"userId","in":"query","schema":{"type":"integer"}},{"description":"Filter by project","name":"projectId","in":"query","schema":{"type":"integer"}},{"description":"Filter by entity type (project, bug, feature, comment, test_feature, canvas_card)","name":"entityType","in":"query","schema":{"type":"string"}},{"description":"Filter by action (create, update, delete)","name":"action","in":"query","schema":{"type":"string"}},{"description":"Inclusive start date, YYYY-MM-DD (UTC)","name":"from","in":"query","schema":{"type":"string"}},{"description":"Inclusive end date, YYYY-MM-DD (UTC)","name":"to","in":"query","schema":{"type":"string"}},{"description":"Case-insensitive substring match over the entry's details (entity titles)","name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.LogWithUser"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/mentions":{"get":{"security":[{"BearerAuth":[]}],"description":"One keyset page of messages that named the caller, newest first. `before` is the `id` of the oldest row on the previous page; omit it for the first page. `unread=true` narrows to what still needs attention. Only DIRECT mentions appear — `@channel` and `@here` are a property of the message rather than of every member, so they are not filed per person.","tags":["chat"],"summary":"The caller's mentions","parameters":[{"description":"Keyset cursor: id of the oldest row already seen","name":"before","in":"query","schema":{"type":"integer"}},{"description":"Page size (default 30, max 100)","name":"limit","in":"query","schema":{"type":"integer"}},{"description":"Only unread mentions","name":"unread","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MentionPage"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/mentions/read-all":{"post":{"security":[{"BearerAuth":[]}],"description":"Marks all of the caller's unread mentions read, for the current organization only. Returns how many were cleared.","tags":["chat"],"summary":"Clear every mention","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MentionCount"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/mentions/unread-count":{"get":{"security":[{"BearerAuth":[]}],"description":"The sidebar badge, for the caller's current organization. Scoped per org because the badge is per workspace — one customer's unread mentions must not show up while you are looking at another's.","tags":["chat"],"summary":"Unread mention count","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MentionCount"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/mentions/{uuid}/read":{"post":{"security":[{"BearerAuth":[]}],"description":"Stamps a mention read. Succeeds whether or not anything changed — an already-read mention and one belonging to somebody else are deliberately indistinguishable in the response, so this endpoint cannot be used to probe whether a given uuid exists.","tags":["chat"],"summary":"Clear one mention","parameters":[{"description":"Mention uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/messages/{uuid}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Replaces the message body and stamps `editedAt`. Author-only at every role — a channel admin may delete another person's message but may never rewrite it. The message keeps its `seq`, so an edit does not move any client's cursor.","tags":["chat"],"summary":"Edit your own message","parameters":[{"description":"Message uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.EditMessageRequest"}}},"description":"New body","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelMessage"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Tombstones the message: the row and its `seq` survive so no client's cursor develops a hole, the body is withheld from every response, and the tombstone records who deleted it and why. The author may delete their own; deleting someone else's requires chat.manage on the channel. Not idempotent — deleting an already-deleted message is a 404, so a second delete cannot overwrite who moderated it first.","tags":["chat"],"summary":"Delete a message","parameters":[{"description":"Message uuid","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChannelMessage"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/notifications":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the caller's paginated in-app notifications plus a top-level unreadCount for the bell badge.","tags":["notifications"],"summary":"List the notification inbox","operationId":"listNotifications","parameters":[{"description":"Page size (default 50, max 100)","name":"limit","in":"query","schema":{"type":"integer"}},{"description":"Offset into the list (default 0)","name":"offset","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.NotificationListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/notifications/mark-by-entity":{"post":{"security":[{"BearerAuth":[]}],"description":"Clears every unread notification tied to a given entity (e.g. all rows for bug 42) in one call.","tags":["notifications"],"summary":"Mark notifications read by entity","operationId":"markNotificationsReadByEntity","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.MarkByEntityRequest"}}},"description":"Entity type + id","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MarkBulkResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/notifications/read-all":{"post":{"security":[{"BearerAuth":[]}],"tags":["notifications"],"summary":"Mark all notifications read","operationId":"markAllNotificationsRead","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MarkBulkResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/notifications/unread-count":{"get":{"security":[{"BearerAuth":[]}],"tags":["notifications"],"summary":"Get the unread notification count","operationId":"getUnreadNotificationCount","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.UnreadCountResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/notifications/{id}/read":{"post":{"security":[{"BearerAuth":[]}],"tags":["notifications"],"summary":"Mark a notification read","operationId":"markNotificationRead","parameters":[{"description":"Notification id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MarkReadResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/oauth/grants":{"get":{"security":[{"BearerAuth":[]}],"description":"The caller's live MCP OAuth grants, newest first: which client, which organization, what it may do and when it last called. Keys created by hand are not listed here; they are on the API token routes.","tags":["mcp-oauth"],"summary":"List the apps connected to my account through MCP OAuth","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/handler.MCPOAuthGrantResponse"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/oauth/grants/{id}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Ends the grant at once: its access token stops authenticating on the next call and its refresh token no longer redeems. Only the grant's owner can revoke it.","tags":["mcp-oauth"],"summary":"Revoke an app connected through MCP OAuth","parameters":[{"description":"Grant id","name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/oauth/requests/{id}":{"get":{"security":[{"BearerAuth":[]}],"description":"What the consent screen shows before a person approves a client's request to use their BugBoard through MCP: who is asking (the name it gave itself and, for a client that identifies itself by URL, the host that URL is on), where the browser goes afterwards, whether that is only the person's own machine, and the most they can grant. Session-authenticated; the request id is a 256-bit value from the consent URL.","tags":["mcp-oauth"],"summary":"Read a pending MCP authorization request","parameters":[{"description":"Request id","name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/handler.MCPOAuthConsentResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/oauth/requests/{id}/approve":{"post":{"security":[{"BearerAuth":[]}],"description":"Records the signed-in person's decision: the organization, the scopes (at most what the client asked for) and the projects (none listed means every project they reach in the organization, including future ones) the client may use. Returns the client's redirect URL carrying the one-time authorization code. The grant narrows what the person can do and never adds to it.","tags":["mcp-oauth"],"summary":"Approve an MCP authorization request","parameters":[{"description":"Request id","name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.MCPOAuthApproveRequest"}}},"description":"Decision","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/handler.MCPOAuthRedirectResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/oauth/requests/{id}/deny":{"post":{"security":[{"BearerAuth":[]}],"description":"Records a refusal and returns the client's redirect URL carrying access_denied, so the person can end a request they did not start immediately.","tags":["mcp-oauth"],"summary":"Deny an MCP authorization request","parameters":[{"description":"Request id","name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/handler.MCPOAuthRedirectResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns every organization the caller belongs to, each with its member count.","tags":["organizations"],"summary":"List the caller's organizations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.OrgListItem"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Creates a new organization owned by the caller. A user may create at most 5 organizations in any 24 hours; the sixth is refused with 429 ORG_CREATE_LIMIT.","tags":["organizations"],"summary":"Create an organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateOrgRequest"}}},"description":"Organization payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OrgSummary"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/storage":{"get":{"security":[{"BearerAuth":[]}],"tags":["storage"],"summary":"Get org storage usage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.Envelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/storage/attachments":{"get":{"security":[{"BearerAuth":[]}],"tags":["storage"],"summary":"List org attachments for storage management","parameters":[{"description":"Filter by project","name":"projectId","in":"query","schema":{"type":"integer"}},{"description":"Filter by MIME type","name":"mimeType","in":"query","schema":{"type":"string"}},{"description":"size | date","name":"sort","in":"query","schema":{"type":"string"}},{"description":"asc | desc","name":"order","in":"query","schema":{"type":"string"}},{"description":"1-based page","name":"page","in":"query","schema":{"type":"integer"}},{"description":"Page size (max 200)","name":"perPage","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.Envelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"tags":["storage"],"summary":"Delete org attachments","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.DeleteAttachmentsRequest"}}},"description":"Attachment ids","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.Envelope"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the organization detail plus its live member count.","tags":["organizations"],"summary":"Get an organization by id","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OrgDetail"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"patch":{"security":[{"BearerAuth":[]}],"description":"Updates an organization's mutable fields and returns the trimmed summary.","tags":["organizations"],"summary":"Update an organization","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateOrgRequest"}}},"description":"Fields to update","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OrgSummary"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/audit-log":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns recent audit events, most-recent first. Owner/admin only. Offset-paginated (bounded admin list).","tags":["organizations"],"summary":"Get an organization's audit log","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Page size (default 50)","name":"limit","in":"query","schema":{"type":"integer"}},{"description":"Row offset (default 0)","name":"offset","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AuditLogResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/billing-settings":{"get":{"security":[{"BearerAuth":[]}],"description":"Admin only. The org's currency plus the org-scope default rungs both rate ladders fall back to.","tags":["billing-rates"],"summary":"Get the org's billing settings","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OrgBillingSettings"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"put":{"security":[{"BearerAuth":[]}],"description":"Admin only. Sets the org currency and/or the org-scope default rates. Existing time entries keep their snapshotted rate and currency.","tags":["billing-rates"],"summary":"Update the org's billing settings","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateOrgBillingSettingsRequest"}}},"description":"Settings","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OrgBillingSettings"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/delete":{"post":{"security":[{"BearerAuth":[]}],"description":"Owners only. Needs the organization's name typed and a re-authentication (the current password, or the code from POST /orgs/{id}/deletion-code). Every subscription that has not ended is cancelled at Stripe first; if Stripe does not confirm, nothing is deleted (502 BILLING_CANCEL_FAILED). Then the organization is deleted and every member, pending invite and organization API key loses access at once. Its data is purged after 30 days; billing and time records are kept for the statutory period. nextOrgId is where the caller continues: another of their organizations, or a new empty workspace (newWorkspace) when this was their last. A wrong password or code is 403 REAUTH_FAILED. Irreversible.","tags":["organizations"],"summary":"Delete an organization","operationId":"deleteOrg","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.DeleteOrgRequest"}}},"description":"Typed name and password or code","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/dto.DeleteOrgResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"502":{"description":"Bad Gateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/deletion-check":{"get":{"security":[{"BearerAuth":[]}],"description":"Whether the caller may delete the organization (owners only), how they confirm it (password or a mailed code), how many other people lose access, whether a subscription is cancelled first and whether accounting records are kept. Read-only.","tags":["organizations"],"summary":"What deleting an organization will do","operationId":"orgDeletionCheck","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/dto.OrgDeletionCheck"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/deletion-code":{"post":{"security":[{"BearerAuth":[]}],"description":"For an owner whose account has no password: mails a 6-digit code (10 minutes, 5 attempts) that confirms POST /orgs/{id}/delete. 400 for an account with a password. Rate-limited per user.","tags":["organizations"],"summary":"Mail a code that confirms deleting an organization","operationId":"requestOrgDeletionCode","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RequestCodeResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/get-started":{"get":{"security":[{"BearerAuth":[]}],"description":"Whether the dashboard shows its Get started card to the caller, and how far its three steps are. Visible is false for anyone who is not an owner or admin of the organization, for an organization that never had the card, and once the card was hidden or finished. Finishing the last step hides the card for good.","tags":["organizations"],"summary":"State of the first-run Get started card","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/dto.GetStartedResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/get-started/hide":{"post":{"security":[{"BearerAuth":[]}],"description":"Hides the Get started card for the whole organization. Owner/admin only. Idempotent.","tags":["organizations"],"summary":"Hide the first-run Get started card","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/invite":{"post":{"security":[{"BearerAuth":[]}],"description":"Invites a single email to the org. Admin/owner only. The plaintext token is returned only in test mode.","tags":["organizations"],"summary":"Invite a member to an organization","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.InviteMemberRequest"}}},"description":"Invite payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.InviteCreated"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/invites":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns pending invitations sent by the organization. Admin/owner only.","tags":["organizations"],"summary":"List an organization's sent invites","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/dto.SentInvite"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/invites/bulk":{"post":{"security":[{"BearerAuth":[]}],"description":"Invites many emails in one call and returns a per-email success/failure list.","tags":["organizations"],"summary":"Bulk-invite members","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.BulkInviteRequest"}}},"description":"Emails to invite","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/dto.BulkInviteResult"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/invites/{inviteId}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Cancels a pending invitation. Admin/owner only.","tags":["organizations"],"summary":"Cancel a pending invitation","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Invite id","name":"inviteId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/invites/{inviteId}/resend":{"post":{"security":[{"BearerAuth":[]}],"description":"Re-sends the invitation email for a pending invite. Admin/owner only.","tags":["organizations"],"summary":"Resend an invitation email","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Invite id","name":"inviteId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/mcp-audit":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the org's MCP tool-call audit rows (offset-paginated). Caller's own org only.","tags":["mcp"],"summary":"List MCP call audit log (org admin)","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Page size (default 50)","name":"limit","in":"query","schema":{"type":"integer"}},{"description":"Offset (default 0)","name":"offset","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MCPAuditListResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/members":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the org member roster. Admin/owner only.","tags":["organizations"],"summary":"List an organization's members","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.OrgMemberItem"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/members/me":{"delete":{"security":[{"BearerAuth":[]}],"description":"Removes the caller from the org. Refused if the caller is the sole owner.","tags":["organizations"],"summary":"Leave an organization","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/members/{memberId}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Removes a user from the org (cascades to project memberships). Admin/owner only.","tags":["organizations"],"summary":"Remove a member from an organization","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Member id","name":"memberId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/members/{memberId}/role":{"patch":{"security":[{"BearerAuth":[]}],"description":"Owner-only. Rejects role=owner (use transfer-ownership) and self-targeting.","tags":["organizations"],"summary":"Update a member's role","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Member id","name":"memberId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateMemberRoleRequest"}}},"description":"New role","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/repositories":{"get":{"security":[{"BearerAuth":[]}],"description":"Every repo attached to the org, enriched with live fileCount / jobStatus / lastIndexedAt. Org admin only.","tags":["repositories"],"summary":"List an org's repositories","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.OrgRepositoryView"}}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Org-admin-gated generic-git create. Same body as the project-scoped create; the row's org comes from the URL.","tags":["repositories"],"summary":"Connect a generic-git repository to the org pool","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/handler.CreateGenericRequest"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.GenericRepoCreatedResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/orgs/{id}/transfer-ownership":{"post":{"security":[{"BearerAuth":[]}],"description":"Owner-only atomic owner swap.","tags":["organizations"],"summary":"Transfer organization ownership","parameters":[{"description":"Organization id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.TransferOwnershipRequest"}}},"description":"New owner","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/presence/heartbeat":{"post":{"security":[{"BearerAuth":[]}],"description":"Stamps the caller's presence. Send roughly every 30 seconds while the client is focused; a heartbeat older than 90 seconds resolves to offline. Does NOT clear a manual status — somebody on do-not-disturb is still heartbeating, and treating that as an intention to come back would make the setting impossible to keep.","tags":["chat"],"summary":"Report that the caller is still here","responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/presence/status":{"patch":{"security":[{"BearerAuth":[]}],"description":"`status` is `active`, `away` or `dnd`, or empty to clear it and fall back to inferring from the heartbeat. A stated status always wins over inference. `offline` is deliberately NOT accepted — appearing offline while connected is a separate feature with its own rules for notifications and read receipts, and quietly accepting it here would ship half of it by accident.","tags":["chat"],"summary":"Set or clear a manual presence status","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.PresenceStatusRequest"}}},"description":"Status","required":true},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/project-subscriptions":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns every stored (non-default) subscription for the caller in the current org.","tags":["subscriptions"],"summary":"List the caller's project subscriptions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.ProjectSubscription"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/project-templates":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the built-in project templates the create-project modal offers. Static data, served behind auth like every other call.","tags":["projects"],"summary":"List the built-in project templates","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.ProjectTemplate"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns all projects in the active org with summary stats. Set includeArchived=true to include archived projects.","tags":["projects"],"summary":"List the org's projects","parameters":[{"description":"Include archived projects","name":"includeArchived","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.ProjectSummary"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Creates a project in the active org and returns the full canonical project resource.","tags":["projects"],"summary":"Create a project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateProjectRequest"}}},"description":"Project payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ProjectResource"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the project detail including resolved board columns, feature toggles, counts, and GitHub binding.","tags":["projects"],"summary":"Get a project by id","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ProjectDetailResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"patch":{"security":[{"BearerAuth":[]}],"description":"Updates the project's mutable fields and returns the full canonical project resource.","tags":["projects"],"summary":"Update a project","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateProjectRequest"}}},"description":"Fields to update","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ProjectResource"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Soft-deletes the project and returns a confirmation message.","tags":["projects"],"summary":"Delete a project","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/billing-items":{"get":{"security":[{"BearerAuth":[]}],"description":"Admin only. Milestones, one-off charges, and per-task fixed prices, in display order.","tags":["billing-items"],"summary":"List a project's billing items","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.BillingItem"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Admin only. Kind \"task_fixed\" requires a taskId; the other kinds forbid one.","tags":["billing-items"],"summary":"Add a billing item to a project","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateBillingItemRequest"}}},"description":"Billing item","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.BillingItem"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/billing-items/{itemId}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Admin only. An invoiced item returns 409 — changing one after invoicing is a credit note, not an edit.","tags":["billing-items"],"summary":"Edit a billing item","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Billing item id","name":"itemId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateBillingItemRequest"}}},"description":"Fields to change","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.BillingItem"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Admin only. An invoiced item returns 409.","tags":["billing-items"],"summary":"Delete a billing item","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Billing item id","name":"itemId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/billing-rates":{"get":{"security":[{"BearerAuth":[]}],"description":"Admin only. Returns every rung that can resolve for this project: the org-wide and per-person defaults, the project's own rungs, and the task rungs of its tasks.","tags":["billing-rates"],"summary":"List the billing rates that apply to a project","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.BillingRate"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"put":{"security":[{"BearerAuth":[]}],"description":"Admin only. Writes the (kind, scope, target) slot — a repeat call updates the amount instead of adding a second rung. Existing time entries keep their snapshotted rate.","tags":["billing-rates"],"summary":"Set one billing rate slot","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpsertBillingRateRequest"}}},"description":"Rate slot","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.BillingRate"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/billing-rates/{rateId}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Admin only. Removing a rung changes what FUTURE entries resolve to; entries already snapshotted keep their rate.","tags":["billing-rates"],"summary":"Delete a billing rate","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Billing rate id","name":"rateId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/board":{"get":{"security":[{"BearerAuth":[]}],"description":"One round-trip board payload: the project plus lean active (non-done) task items for bug/feature/change, capped for scale.","tags":["tasks"],"summary":"Get a project's board (project + active task cards)","operationId":"getProjectBoard","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.BoardResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/calendar-feed":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns (minting on first call) the token + full .ics URL calendar apps subscribe to.","tags":["calendar"],"summary":"Get a project's calendar subscribe URL","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.CalendarFeedResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/columns":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the project's board columns in board order (key, label, type, color, position and the number of live tasks in each), the configured landing column and the column a new task lands in now. Org owner or admin, or an API token scoped to projects for a project in its scope; a token scoped to other projects is refused.","tags":["projects"],"summary":"List a project's columns with task counts","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.ProjectColumnSet"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"put":{"security":[{"BearerAuth":[]}],"description":"Replaces the project's whole column set, validated like PATCH /projects/{id} (unique keys, known types, at least one done column). A removed column that still has tasks needs an entry in `move` ({\"old_key\":\"new_key\"}) naming a column of the new set, otherwise the request is refused with 400 and nothing changes; the tasks are moved in the same transaction. `landingColumn` names the column new tasks land in (omit to keep, \"\" to clear); it must be a key of the new set, or a removed key that `move` sends elsewhere, and a set with more than one triage-type column must name one. Moving tasks does not send task.status_changed webhooks. Org owner or admin only; API tokens scoped to projects are refused.","tags":["projects"],"summary":"Replace a project's columns","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.SetProjectColumnsRequest"}}},"description":"New columns, optional move map and landing column","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.ProjectColumnSet"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/comments":{"get":{"security":[{"BearerAuth":[]}],"tags":["chat"],"summary":"List a project's General chat messages","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.ChatMessage"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"tags":["chat"],"summary":"Post to a project's General chat","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.CreateCommentRequest"}}},"description":"Message content","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ChatMessage"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/commit-activity":{"get":{"security":[{"BearerAuth":[]}],"description":"Merged daily commit counts across all connected repos for the trailing ~year, plus a syncing flag when a background refresh was kicked off.","tags":["repositories"],"summary":"Get a project's commit-activity heatmap","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.CommitActivityResponse"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/conversations":{"get":{"security":[{"BearerAuth":[]}],"description":"The project's General chat row plus every task thread. Unread threads first, most unread first; the rest by most-recent activity.","tags":["chat"],"summary":"List a project's conversation threads","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ProjectConversationsResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/findings":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns every durable finding the agents accumulated for the project, ordered by key. Requires project access.","tags":["findings"],"summary":"List a project's agent findings","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.FindingsListResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/findings/{key}":{"put":{"security":[{"BearerAuth":[]}],"description":"Creates or replaces a finding by key (idempotent). Requires project admin.","tags":["findings"],"summary":"Upsert a project finding","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Finding key","name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Finding content","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.FindingWriteResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Removes a finding by key. Requires project admin.","tags":["findings"],"summary":"Delete a project finding","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Finding key","name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OKResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/repositories":{"get":{"security":[{"BearerAuth":[]}],"tags":["repositories"],"summary":"List a project's repositories","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.RepositoryWithStats"}}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Persists an encrypted credential + repository row and runs a best-effort connection test. Project admin only.","tags":["repositories"],"summary":"Connect a generic-git repository to a project","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/handler.CreateGenericRequest"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.GenericRepoCreatedResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/repositories/test-connection":{"post":{"security":[{"BearerAuth":[]}],"description":"Runs an ls-remote against the supplied credentials without persisting anything. Project admin only.","tags":["repositories"],"summary":"Test a generic-git connection","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.CreateGenericRequest"}}},"description":"Repository + credential to probe","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ConnectionTestResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/repository-preferences":{"get":{"security":[{"BearerAuth":[]}],"tags":["repositories"],"summary":"List a project's repository preferences","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.RepositoryPreference"}}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"put":{"security":[{"BearerAuth":[]}],"description":"Atomically replaces the project's default-for-bugs repo set. Project admin only; every repo must be in the project's org.","tags":["repositories"],"summary":"Replace a project's repository preferences","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.PutProjectPreferencesRequest"}}},"description":"Default repository ids","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OKCountResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/scan-duplicates":{"post":{"security":[{"BearerAuth":[]}],"description":"Runs a pairwise similarity scan over the project's existing open tasks and returns created/open counts.","tags":["task-similarity"],"summary":"Scan a project for duplicate tasks","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SimilarityScanResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/sprints":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the active sprint (nil when none) plus the completed sprint history, most-recent first.","tags":["sprints"],"summary":"List a project's sprints","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SprintListResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/sprints/dates":{"post":{"security":[{"BearerAuth":[]}],"description":"Sets the active sprint's planned start/end dates — fired when the sprint bar is dragged/resized on the calendar.","tags":["sprints"],"summary":"Update the active sprint's planned span","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Body with optional startDate/endDate","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.Sprint"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/sprints/end":{"post":{"security":[{"BearerAuth":[]}],"description":"Closes the active sprint, snapshots its task counts, rolls unfinished current tasks to Next, and clears done ones.","tags":["sprints"],"summary":"End the active sprint","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SprintEndResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/sprints/start":{"post":{"security":[{"BearerAuth":[]}],"description":"Creates a new active sprint and promotes the Next bucket into it. Rejects if one is already active.","tags":["sprints"],"summary":"Start a sprint","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Optional body with endDate"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.Sprint"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/sshkey/preview":{"get":{"security":[{"BearerAuth":[]}],"description":"Generates a throwaway keypair so the UI can show \"this is what we'll generate\". The private half is dropped immediately. Project admin only.","tags":["repositories"],"summary":"Preview a generated SSH deploy key","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SSHKeyPreviewResponse"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/subscription":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the caller's notification level for one project (defaults to \"participating\" when never set).","tags":["subscriptions"],"summary":"Get the caller's subscription for a project","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SubscriptionLevelResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"put":{"security":[{"BearerAuth":[]}],"tags":["subscriptions"],"summary":"Set the caller's subscription for a project","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Subscription level","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SubscriptionLevelResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/time-entries/apply-rates":{"post":{"security":[{"BearerAuth":[]}],"description":"Admin only. Re-resolves the snapshots of unlocked entries whose rate never resolved, leaving already-rated and locked entries untouched. Never runs automatically.","tags":["time"],"summary":"Re-rate a project's unrated time entries","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ApplyRatesResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/time-export":{"get":{"security":[{"BearerAuth":[]}],"description":"Admin only. One row per entry; money stays in integer minor units so the file reconciles exactly with the API.","tags":["time"],"summary":"Export a project's time entries as CSV","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Lower bound on startedAt (RFC3339 or YYYY-MM-DD)","name":"from","in":"query","schema":{"type":"string"}},{"description":"Upper bound on startedAt (RFC3339 or YYYY-MM-DD, inclusive)","name":"to","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"CSV document","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"text/csv":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"text/csv":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{id}/time-summary":{"get":{"security":[{"BearerAuth":[]}],"description":"Totals plus per-user and per-task breakdowns. Money and billing items are included only for an admin on a cost-tracking project.","tags":["time"],"summary":"Time report for one project","parameters":[{"description":"Project id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Lower bound on startedAt (RFC3339 or YYYY-MM-DD)","name":"from","in":"query","schema":{"type":"string"}},{"description":"Upper bound on startedAt (RFC3339 or YYYY-MM-DD, inclusive)","name":"to","in":"query","schema":{"type":"string"}},{"description":"Which breakdown to compute; both when omitted","name":"groupBy","in":"query","schema":{"type":"string","enum":["user","task"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ProjectTimeSummary"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/canvas":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the whole canvas board — every card and edge — for the project.","tags":["canvas"],"summary":"Get a project's brainstorming board","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/service.CanvasBoard"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/canvas/ai/expand":{"post":{"security":[{"BearerAuth":[]}],"description":"Fleshes a one-line idea into a short markdown spec.","tags":["canvas"],"summary":"Expand an idea into a spec","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Idea text","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.CanvasExpandResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/canvas/ai/suggest":{"post":{"security":[{"BearerAuth":[]}],"description":"Returns a handful of idea one-liners to seed the board.","tags":["canvas"],"summary":"Suggest fresh ideas","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Optional context"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.CanvasIdeasResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/canvas/ai/widget":{"post":{"security":[{"BearerAuth":[]}],"description":"Asks the model for a self-contained HTML artifact for a widget card.","tags":["canvas"],"summary":"Generate a widget card's HTML","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Prompt","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.CanvasWidgetResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/canvas/cards":{"post":{"security":[{"BearerAuth":[]}],"description":"Adds a card (sticky, idea, widget, note, …) to the project's board.","tags":["canvas"],"summary":"Create a canvas card","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Card payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CanvasCard"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/canvas/cursor":{"post":{"security":[{"BearerAuth":[]}],"description":"Publishes an ephemeral cursor event to the board topic. Client-throttled; never persisted.","tags":["canvas"],"summary":"Publish a canvas cursor position","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Cursor x/y","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OKResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/canvas/edges":{"post":{"security":[{"BearerAuth":[]}],"description":"Draws a directed connector between two cards on the board.","tags":["canvas"],"summary":"Create a canvas edge","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Edge payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CanvasEdge"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/members":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the project member roster with each member's role and trimmed user.","tags":["project-members"],"summary":"List a project's members","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.ProjectMemberItem"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Adds an org member to the project (defaults to the member role) and returns the created membership.","tags":["project-members"],"summary":"Add a member to a project","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.AddMemberRequest"}}},"description":"Member to add","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ProjectMemberItem"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/members/assignable":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns all users who can be assigned to tasks in the project.","tags":["project-members"],"summary":"List users assignable to project tasks","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.OrgMemberOption"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/members/available":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns org members eligible to be added to the project.","tags":["project-members"],"summary":"List org members not yet on the project","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.OrgMemberOption"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/members/{userId}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Updates a member's project role and returns the updated membership.","tags":["project-members"],"summary":"Update a project member's role","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Target user id","name":"userId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.UpdateRoleRequest"}}},"description":"New role","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ProjectMemberItem"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Removes a member from the project and returns a confirmation message.","tags":["project-members"],"summary":"Remove a member from a project","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Target user id","name":"userId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/saved-filters":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the saved board filters visible to the caller in the project: their own private filters plus every org-scoped filter in the org, ordered for the filter bar.","tags":["saved-filters"],"summary":"List a project's saved filters","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.SavedFilterResponse"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Creates a named board filter in the project. Required: name, config. `config` is stored opaquely as JSON and never interpreted by the server.","tags":["saved-filters"],"summary":"Create a saved filter","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Saved filter payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SavedFilterResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/tags":{"get":{"security":[{"BearerAuth":[]}],"tags":["tags"],"summary":"List a project's tags","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/domain.Tag"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/tasks":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns all tasks for a project. Optional query filters narrow by type/status/priority/assignee/search.","tags":["tasks"],"summary":"List tasks in a project","operationId":"listProjectTasks","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Filter by task type","name":"type","in":"query","schema":{"type":"string","enum":["bug","feature","change"]}},{"description":"Filter by status","name":"status","in":"query","schema":{"type":"string"}},{"description":"Filter by priority","name":"priority","in":"query","schema":{"type":"string"}},{"description":"Filter by assignee user id — matches tasks this user is AMONG the assignees of","name":"assignedTo","in":"query","schema":{"type":"integer"}},{"description":"Full-text search on title/description","name":"search","in":"query","schema":{"type":"string"}},{"description":"Page size (default 500, max 500)","name":"limit","in":"query","schema":{"type":"integer"}},{"description":"Opaque keyset cursor from a previous page's meta.nextCursor","name":"cursor","in":"query","schema":{"type":"string"}},{"description":"Include the total match count in meta (admin/analytics; off the hot path)","name":"withTotal","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TaskListItem"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/tasks/by-number/{taskNumber}":{"get":{"security":[{"BearerAuth":[]}],"description":"Resolves the unified per-project task number without a type discriminator, so the /tasks/:taskNumber route resolves in one request. Follows legacy per-type number aliases as a fallback for old deep links.","tags":["tasks"],"summary":"Resolve a task by its per-project number (type-agnostic)","operationId":"resolveTaskByNumber","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Per-project task number","name":"taskNumber","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.TaskDetail"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/tasks/{type}/{taskNumber}":{"get":{"security":[{"BearerAuth":[]}],"description":"Resolves the human-facing (project, type, taskNumber) address (e.g. bug-3), following legacy number aliases.","tags":["tasks"],"summary":"Get a task by its per-project number","operationId":"getTaskByNumber","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Task type","name":"type","in":"path","required":true,"schema":{"type":"string","enum":["bug","feature","change","test"]}},{"description":"Per-project task number","name":"taskNumber","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskDetail"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/test-areas":{"post":{"security":[{"BearerAuth":[]}],"tags":["testing"],"summary":"Create a test area","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Area name","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TestArea"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/projects/{projectId}/test-board":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the columns (areas) plus the feature cards for the Testing tab.","tags":["testing"],"summary":"Get a project's Testing board","parameters":[{"description":"Project id","name":"projectId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TestBoardResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/push/devices":{"post":{"security":[{"BearerAuth":[]}],"description":"Records where the caller's notifications should be delivered — an APNs token for iOS or an FCM token for Android. Registration is idempotent and is expected on every app launch: it refreshes the last-seen stamp and the recorded app version. The device is bound to the request's org, so a client that switches workspace must register again. Signing in on a handset that another user had registered moves the token to the new user, so the previous user stops receiving notifications there. Returns 503 when this deployment has no provider configured for the platform — a token that could never be delivered to is refused rather than stored.","tags":["push"],"summary":"Register a device for push notifications","operationId":"registerPushDevice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.RegisterPushDeviceRequest"}}},"description":"Device registration","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.PushDeviceResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Retires one of the caller's own device tokens — the path a client takes when the user turns notifications off in the app. Idempotent: retiring a token that is already gone succeeds, because a client that deregisters twice, or after the provider already killed the token, has achieved what it asked for. Only the token's owner can retire it. Signing out retires every device the user has, so this is not required before logout.","tags":["push"],"summary":"Stop delivering push to a device","operationId":"deregisterPushDevice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.DeregisterPushDeviceRequest"}}},"description":"Device to retire","required":true},"responses":{"204":{"description":"Device retired"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/report-bug":{"post":{"description":"Public endpoint that emails a product bug report to the BugBoard team.","tags":["support"],"summary":"Submit a bug report","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.BugReportRequest"}}},"description":"Bug report payload","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MessageResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/repositories/{id}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Mutates indexedBranch and/or isPrimary. Requires org admin. Returns the updated repository.","tags":["repositories"],"summary":"Update a repository","parameters":[{"description":"Repository id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.UpdateRepoRequest"}}},"description":"Fields to update","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.Repository"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Removes a repo from the org (cascades to bug + preference links). Requires org admin.","tags":["repositories"],"summary":"Delete a repository","parameters":[{"description":"Repository id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.OKResponse"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/repositories/{id}/branches":{"get":{"security":[{"BearerAuth":[]}],"description":"Lists branches for a github_app repo. Other providers return an empty list plus a hint. Any org member.","tags":["repositories"],"summary":"List a repository's branches","parameters":[{"description":"Repository id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RepoBranchesResponse"}}}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/repositories/{id}/reindex":{"post":{"security":[{"BearerAuth":[]}],"description":"Enqueues (or coalesces onto) an index job for the repo's indexed branch. Requires org admin.","tags":["repositories"],"summary":"Reindex a repository","parameters":[{"description":"Repository id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ReindexResponse"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/saved-filters/{id}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Partially updates a saved filter. Only the creator may edit a locked org-scoped filter, or change `scope` / `isLocked` on any filter.","tags":["saved-filters"],"summary":"Update a saved filter","parameters":[{"description":"Saved filter id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/Body"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SavedFilterResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Deletes a saved filter and returns a deleted flag. Only the creator may delete a locked org-scoped filter.","tags":["saved-filters"],"summary":"Delete a saved filter","parameters":[{"description":"Saved filter id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeletedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/search":{"get":{"security":[{"BearerAuth":[]}],"description":"Command-palette search across bugs, features, changes, and projects in the caller's org.","tags":["search"],"summary":"Org-wide search","parameters":[{"description":"Search query","name":"q","in":"query","required":true,"schema":{"type":"string"}},{"description":"Comma-separated result types (default bug,feature,change,project)","name":"types","in":"query","schema":{"type":"string"}},{"description":"Max hits (default 20, max 100)","name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/dto.SearchHit"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/sse/ticket":{"post":{"security":[{"BearerAuth":[]}],"description":"Returns a short-lived, single-use ticket to open one SSE stream without leaking the JWT in the URL.","tags":["sse"],"summary":"Mint an SSE auth ticket","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.SSETicketRequest"}}},"description":"Stream to scope the ticket to","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SSETicketResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/stats/activity":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the per-day activity buckets (zero-filled, oldest first) for the dashboard sparkline. Optionally scoped to one project.","tags":["stats"],"summary":"Get org activity stats","parameters":[{"description":"Window in days (1-90, default 14)","name":"days","in":"query","schema":{"type":"integer"}},{"description":"Scope to one project","name":"projectId","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.ActivityResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tags":{"post":{"security":[{"BearerAuth":[]}],"tags":["tags"],"summary":"Create a tag","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateTagRequest"}}},"description":"Tag payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domain.Tag"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"A tag with this name already exists in the project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tags/{id}":{"patch":{"security":[{"BearerAuth":[]}],"tags":["tags"],"summary":"Update a tag","parameters":[{"description":"Tag id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateTagRequest"}}},"description":"Fields to update","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domain.Tag"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"A tag with this name already exists in the project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"tags":["tags"],"summary":"Delete a tag","parameters":[{"description":"Tag id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"deleted"},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/task-links/{id}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Removes a typed task↔task relation by its link id.","tags":["task-links"],"summary":"Delete a task link","parameters":[{"description":"Task link id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeleteResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/task-similarities/{id}/confirm":{"post":{"security":[{"BearerAuth":[]}],"description":"Accepts a similarity suggestion and materializes the real task link. An absent kind uses the suggested one.","tags":["task-similarity"],"summary":"Confirm a similarity suggestion","parameters":[{"description":"Similarity id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ConfirmSimilarityRequest"}}},"description":"Optional override of the link kind"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SimilarityConfirmResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/task-similarities/{id}/dismiss":{"post":{"security":[{"BearerAuth":[]}],"description":"Rejects a similarity suggestion so it no longer surfaces on the task.","tags":["task-similarity"],"summary":"Dismiss a similarity suggestion","parameters":[{"description":"Similarity id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SimilarityDismissResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks":{"post":{"security":[{"BearerAuth":[]}],"description":"Creates a bug/feature/change. Required: projectId, type, title. Returns the new task.","tags":["tasks"],"summary":"Create a task","operationId":"createTask","parameters":[{"description":"Optional key making the create safe to retry","name":"Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateTaskRequest"}}},"description":"Task payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskDetail"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/bulk":{"post":{"security":[{"BearerAuth":[]}],"description":"Applies a partial field set to many tasks at once; every id must belong to the caller's org, and the caller must be able to edit each task's project and any destination projectId (403 on any miss, nothing written).","tags":["tasks"],"summary":"Bulk-update tasks","operationId":"bulkUpdateTasks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.BulkResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/check-duplicates":{"post":{"security":[{"BearerAuth":[]}],"description":"Returns existing same-type tasks whose title matches the given one, so the create form can warn before filing.","tags":["tasks"],"summary":"Find likely-duplicate tasks","operationId":"checkDuplicateTasks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TaskListItem"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/my-work":{"get":{"security":[{"BearerAuth":[]}],"description":"Cursor-paginated, org-wide list of the caller's tasks for one involvement segment (assigned / created / following). Scoped to projects the caller can reach; excludes finished work unless includeDone=1.","tags":["tasks"],"summary":"List my work across all projects","operationId":"myWork","parameters":[{"description":"Which segment to list (default assigned)","name":"involvement","in":"query","schema":{"type":"string","enum":["assigned","created","following"]}},{"description":"Include tasks in a finished column (default false)","name":"includeDone","in":"query","schema":{"type":"boolean"}},{"description":"Page size (default 50, max 200)","name":"limit","in":"query","schema":{"type":"integer"}},{"description":"Opaque keyset cursor from a previous page's meta.nextCursor","name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.MyWorkItem"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/{id}":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the task with rollup counters, denormalized emails, and (when wired) subscription state.","tags":["tasks"],"summary":"Get a task by id","operationId":"getTask","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskDetail"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"patch":{"security":[{"BearerAuth":[]}],"description":"Partial update — every field is optional, nil means \"leave unchanged\". Returns the updated task.","tags":["tasks"],"summary":"Update a task","operationId":"updateTask","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/dto.UpdateTaskRequest"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskDetail"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Permanently deletes a task; junction rows (initiatives, links) cascade.","tags":["tasks"],"summary":"Delete a task","operationId":"deleteTask","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeleteResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/{id}/agent-handoff":{"post":{"security":[{"BearerAuth":[]}],"description":"Records one agent_handoff product event for the caller and the task (one per user, task, target and UTC day). It stores only the target, never the task's text, and a failure to write the event does not fail the call.","tags":["task-handoff"],"summary":"Record that a task was handed to a coding agent","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.AgentHandoffRequest"}}},"description":"Which agent","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.AgentHandoffResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/{id}/comments":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns a keyset page of a task's comment thread (oldest first), each joined with its author. Follow meta.nextCursor for the rest of the thread.","tags":["comments"],"summary":"List a task's comments","operationId":"listTaskComments","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Page size (default 50, max 200)","name":"limit","in":"query","schema":{"type":"integer"}},{"description":"Opaque keyset cursor from a previous page's meta.nextCursor","name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.CommentWithUser"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Posts a comment to a task's thread and fans out @mention + subscriber notifications.","tags":["comments"],"summary":"Add a comment to a task","operationId":"createTaskComment","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Optional key making the comment create safe to retry","name":"Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/apimodel.CreateCommentRequest"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.CommentWithUser"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/{id}/links":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the typed relations pointing out of and into this task, each hydrated with the referenced task's summary.","tags":["task-links"],"summary":"List a task's links","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskLinks"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Creates a typed relation from this task to a target task. Returns the created link.","tags":["task-links"],"summary":"Link two tasks","parameters":[{"description":"Source task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.CreateTaskLinkRequest"}}},"description":"Target task and link type","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/domain.TaskLink"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/{id}/similar":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns auto-detected same-project similarity candidates for a task, hydrated with the other task's summary.","tags":["task-similarity"],"summary":"List similar tasks","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SimilaritySuggestions"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/{id}/subscribe":{"post":{"security":[{"BearerAuth":[]}],"description":"Subscribes the caller to a task's activity. Idempotent — a repeat call returns the same subscribed:true payload.","tags":["task-subscriptions"],"summary":"Subscribe to a task","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SubscriptionResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Removes the caller's subscription to a task. Idempotent — returns subscribed:false either way.","tags":["task-subscriptions"],"summary":"Unsubscribe from a task","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SubscriptionResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/{id}/subscription":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the caller's subscribed flag plus the task's total subscriber count.","tags":["task-subscriptions"],"summary":"Get a task's subscription state","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.SubscriptionState"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/{id}/test-features":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the test features that cover the task (the task-side \"Test coverage\" panel).","tags":["testing"],"summary":"List a task's test coverage","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TestFeatureForTask"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/tasks/{id}/time-summary":{"get":{"security":[{"BearerAuth":[]}],"description":"Own minutes, subtree total, and contributors. Money is included only for an admin on a cost-tracking project.","tags":["time"],"summary":"Time rollup for one task","parameters":[{"description":"Task id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TaskTimeSummary"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/test-areas/{id}":{"patch":{"security":[{"BearerAuth":[]}],"tags":["testing"],"summary":"Update a test area","parameters":[{"description":"Test area id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/Body"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TestArea"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Deletes an area and cascades its features.","tags":["testing"],"summary":"Delete a test area","parameters":[{"description":"Test area id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeletedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/test-areas/{id}/features":{"post":{"security":[{"BearerAuth":[]}],"description":"Creates a Type==\"test\" task in the area.","tags":["testing"],"summary":"Create a test feature","parameters":[{"description":"Test area id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Feature payload","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TestFeature"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/test-features/{id}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Updates the test-only fields (status/area/checks). :id is the task id.","tags":["testing"],"summary":"Update a test feature","parameters":[{"description":"Test feature (task) id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/Body"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TestFeature"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"tags":["testing"],"summary":"Delete a test feature","parameters":[{"description":"Test feature (task) id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeletedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/test-features/{id}/result":{"post":{"security":[{"BearerAuth":[]}],"description":"Records a pass/fail/rereview result (optionally linking a task) and returns the updated feature.","tags":["testing"],"summary":"Record a test-feature result","parameters":[{"description":"Test feature (task) id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Result payload","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TestFeature"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/test-features/{id}/tasks":{"get":{"security":[{"BearerAuth":[]}],"tags":["testing"],"summary":"List a test feature's linked tasks","parameters":[{"description":"Test feature (task) id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TaskListItem"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"tags":["testing"],"summary":"Link a task to a test feature","parameters":[{"description":"Test feature (task) id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#/components/requestBodies/Body2"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.LinkedResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/test-features/{id}/tasks/{taskId}":{"delete":{"security":[{"BearerAuth":[]}],"tags":["testing"],"summary":"Unlink a task from a test feature","parameters":[{"description":"Test feature (task) id","name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"description":"Task id","name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.UnlinkedResult"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/time-entries":{"get":{"security":[{"BearerAuth":[]}],"description":"Members see only their own entries; an admin may filter by userId. Financial fields are absent for members.","tags":["time"],"summary":"List time entries","parameters":[{"description":"Project id","name":"projectId","in":"query","schema":{"type":"integer"}},{"description":"User id (admin only)","name":"userId","in":"query","schema":{"type":"integer"}},{"description":"Task id","name":"taskId","in":"query","schema":{"type":"integer"}},{"description":"Lower bound on startedAt (RFC3339 or YYYY-MM-DD)","name":"from","in":"query","schema":{"type":"string"}},{"description":"Upper bound on startedAt (RFC3339 or YYYY-MM-DD, inclusive)","name":"to","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TimeEntry"}}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Creates a manual or week-grid entry. The billable and cost rates are resolved once here and frozen onto the row; later edits never re-resolve them.","tags":["time"],"summary":"Log a time entry","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateTimeEntryRequest"}}},"description":"Time entry","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TimeEntry"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/time-entries/running":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the caller's open entry, or no data when nothing is running.","tags":["time"],"summary":"Get the caller's running timer","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TimeEntry"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/time-entries/start":{"post":{"security":[{"BearerAuth":[]}],"description":"Opens a running entry on a task. Returns 409 when one already runs — silently stopping the previous timer would lose time the user cannot recover.","tags":["time"],"summary":"Start a timer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.StartTimerRequest"}}},"description":"Task to track","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TimeEntry"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/time-entries/stop":{"post":{"security":[{"BearerAuth":[]}],"description":"Closes the open entry and writes the elapsed span, rounded half-up to the nearest minute.","tags":["time"],"summary":"Stop the caller's running timer","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TimeEntry"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/time-entries/{id}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Partial edit. Rates are never re-resolved. A locked entry returns 409.","tags":["time"],"summary":"Edit a time entry","parameters":[{"description":"Time entry id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateTimeEntryRequest"}}},"description":"Fields to change","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TimeEntry"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Soft-deletes the entry. A locked entry returns 409.","tags":["time"],"summary":"Delete a time entry","parameters":[{"description":"Time entry id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/topics/{uuid}":{"patch":{"security":[{"BearerAuth":[]}],"description":"Partially updates a topic. Requires channel-manage authority. `position` is the explicit tab order — human-set rather than derived, because sorting by name would reshuffle the bar on a rename and sorting by activity would move it under the cursor. Re-tagging existing messages is NOT part of a rename: a topic is a label, and its messages keep pointing at it.","tags":["topics"],"summary":"Rename or reorder a topic","parameters":[{"description":"Topic UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateTopicRequest"}}},"description":"Fields to update","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TopicResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Removes a lane from the tab bar. IT DOES NOT DELETE, HIDE OR RE-TAG ITS MESSAGES — they stay in the channel, keep their `seq`, keep appearing in the All tab, and simply report no topic from then on. That is the whole point of a topic being a filter rather than a room: tidying up a tab can never cost anyone a conversation. Requires channel-manage authority.","tags":["topics"],"summary":"Archive a topic","parameters":[{"description":"Topic UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.RemovedResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/topics/{uuid}/mute":{"post":{"security":[{"BearerAuth":[]}],"description":"Sets the caller's own mute for one lane — the main attention control in the product, and invisible to everyone else. Muting suppresses the channel's `topicsMoved` badge for this topic and NOTHING else: the lane still receives messages and still shows them in the All tab. The one thing mute cannot suppress is a task mention — an `@BUG-241` reference notifies the task's assignees regardless of topic or mute. Requires only read access.","tags":["topics"],"summary":"Mute or unmute a topic for the caller","parameters":[{"description":"Topic UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.MuteTopicRequest"}}},"description":"Mute state","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TopicResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/topics/{uuid}/read":{"post":{"security":[{"BearerAuth":[]}],"description":"Moves the caller's cursor for this lane to `seq` — the PER-CHANNEL message sequence, because a topic filters the channel's one stream and giving topics their own numbering would create a second cursor space to keep in step. The advance is monotonic: a sequence at or below the stored one is accepted and changes nothing, because two of the caller's devices race by design and the slower one must not un-read what the faster one read. Requires only read access.","tags":["topics"],"summary":"Advance the caller's read watermark for a topic","parameters":[{"description":"Topic UUID","name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.MarkTopicReadRequest"}}},"description":"Watermark","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.TopicResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/users/avatars":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns {userId, email, avatarUrl} for every member of the caller's active org who has an avatar. One request backs every avatar on screen, so a member list of N people does not cost N requests. Members without an avatar are omitted.","tags":["users"],"summary":"List avatars for the active org","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.UserAvatarItem"}}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/users/me/avatar":{"patch":{"security":[{"BearerAuth":[]}],"description":"Sets the authenticated user's own avatar. The body carries a small client-resized `data:image/...` URL (max 100 KB); an empty string removes the avatar. The target is always the caller — there is no user id in the path or body.","tags":["users"],"summary":"Set or remove the caller's avatar","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateAvatarRequest"}}},"description":"Avatar payload","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.MeResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/users/me/preferences":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the authenticated user's resolved preferences (FEAT-262). Every field carries a real value — a user who has never saved anything gets the defaults — so the client never duplicates them. There is no user id in the path: the target is always the caller.","tags":["users"],"summary":"Get the caller's own preferences","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.UserPreferencesResponse"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"patch":{"security":[{"BearerAuth":[]}],"description":"Merges the supplied fields into the authenticated user's preferences and returns the resolved result. Omitted fields are left alone. An unknown value is rejected with 400 naming the legal ones. The target is always the caller — there is no user id in the path or body.","tags":["users"],"summary":"Patch the caller's own preferences","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdatePreferencesRequest"}}},"description":"Preference patch","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.UserPreferencesResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/webhooks":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns the org's outbound webhook subscriptions (signing secrets are never included).","tags":["webhooks"],"summary":"List outbound webhooks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.OutboundWebhook"}}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Registers a new subscription. The signing secret is returned ONCE here and never again.","tags":["webhooks"],"summary":"Create an outbound webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.CreateWebhookRequest"}}},"description":"Webhook config","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.WebhookCreatedResponse"}}}]}}}},"400":{"description":"Invalid body, or a url that is not https or targets an internal address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/webhooks/stripe":{"post":{"description":"Receives Stripe webhook events. Public — Stripe validates via signature. Returns 200 with an empty body once the event is applied (or deliberately ignored), and 500 when applying it failed, so Stripe retries it.","tags":["billing"],"summary":"Stripe webhook","parameters":[{"description":"Stripe event signature","name":"Stripe-Signature","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}},"/webhooks/{id}":{"delete":{"security":[{"BearerAuth":[]}],"tags":["webhooks"],"summary":"Delete an outbound webhook","parameters":[{"description":"Webhook id","name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apimodel.Envelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/apimodel.DeleteResult"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.ErrorEnvelope"}}}}}}}},"servers":[{"url":"https://api.bugboard.ai/api/v1"}],"components":{"requestBodies":{"handler.CreateGenericRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.CreateGenericRequest"}}},"description":"Repository + credential","required":true},"uploadBugAttachment":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"File to upload","type":"string","format":"binary"}},"required":["file"]}}},"required":true},"dto.UpdateTaskRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.UpdateTaskRequest"}}},"description":"Fields to update","required":true},"apimodel.CreateCommentRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.CreateCommentRequest"}}},"description":"Comment body","required":true},"apimodel.SetRequestersRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apimodel.SetRequestersRequest"}}},"description":"Requester project ids","required":true},"Body":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Fields to update","required":true},"Body2":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Task id","required":true}},"securitySchemes":{"BearerAuth":{"description":"JWT bearer token issued by /auth/login,\n/auth/register, or /auth/verify-code. Send it as\n`Authorization: Bearer <token>`.","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"apimodel.APIError":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/apimodel.ErrorCode"},"details":{},"message":{"type":"string"}}},"apimodel.APITokenCreatedResponse":{"type":"object","properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"id":{"type":"integer","example":1},"name":{"type":"string","example":"ci-token"},"token":{"type":"string","example":"bb_live_..."},"tokenPrefix":{"type":"string","example":"bb_live_"}}},"apimodel.APITokenListItem":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer","example":1},"lastUsedAt":{"type":"string"},"name":{"type":"string","example":"ci-token"},"tokenPrefix":{"type":"string","example":"bb_live_"}}},"apimodel.AcceptInviteResult":{"type":"object","properties":{"message":{"type":"string"},"org":{"$ref":"#/components/schemas/apimodel.OrgRef"}}},"apimodel.ActivityBucket":{"type":"object","properties":{"byEntity":{"type":"object","additionalProperties":{"type":"integer"}},"count":{"type":"integer"},"date":{"type":"string"}}},"apimodel.ActivityResponse":{"type":"object","properties":{"buckets":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.ActivityBucket"}}}},"apimodel.AddedResult":{"type":"object","properties":{"added":{"type":"boolean","example":true}}},"apimodel.AgentBuildResponse":{"type":"object","properties":{"bugId":{"type":"integer"},"runId":{"type":"string"},"status":{"type":"string"}}},"apimodel.AgentCancelResponse":{"type":"object","properties":{"noRun":{"type":"boolean"},"ok":{"type":"boolean"}}},"apimodel.AgentHandoffResult":{"type":"object","properties":{"recorded":{"type":"boolean"}}},"apimodel.ApplyRatesResult":{"type":"object","properties":{"updatedCount":{"type":"integer"}}},"apimodel.AttachmentResponse":{"type":"object","properties":{"bugId":{"type":"integer"},"createdAt":{"type":"string"},"featureId":{"type":"integer"},"filename":{"type":"string"},"id":{"type":"integer","example":1},"mimeType":{"type":"string","example":"image/png"},"originalName":{"type":"string"},"size":{"type":"integer","example":20481}}},"apimodel.AuditLogResponse":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/dto.AuditLogEntry"}},"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}},"apimodel.AuthOrg":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Acme Inc"},"slug":{"type":"string","example":"acme-inc"}}},"apimodel.AuthUser":{"type":"object","properties":{"email":{"type":"string","example":"dev@bugboard.eu"},"emailVerified":{"description":"EmailVerified is false for a new password sign-up until it enters the\ncode mailed to it (bug-417). Clients send such an account to the\nverify step before anything else.","type":"boolean","example":true},"id":{"type":"integer","example":1},"isAdmin":{"type":"boolean","example":false}}},"apimodel.BillingItem":{"type":"object","properties":{"amountCents":{"type":"integer"},"currency":{"type":"string"},"deliveredAt":{"type":"string"},"id":{"type":"integer"},"invoicedAt":{"type":"string"},"kind":{"$ref":"#/components/schemas/domain.BillingItemKind"},"name":{"type":"string"},"projectId":{"type":"integer"},"sortOrder":{"type":"integer"},"status":{"$ref":"#/components/schemas/domain.BillingItemStatus"},"taskId":{"type":"integer"},"uuid":{"type":"string"}}},"apimodel.BillingRate":{"type":"object","properties":{"currency":{"type":"string"},"id":{"type":"integer"},"kind":{"$ref":"#/components/schemas/domain.RateKind"},"projectId":{"type":"integer"},"rateCents":{"type":"integer"},"scope":{"$ref":"#/components/schemas/domain.RateScope"},"taskId":{"type":"integer"},"userId":{"type":"integer"},"uuid":{"type":"string"}}},"apimodel.BoardProject":{"type":"object","properties":{"archived":{"type":"boolean"},"avatarUrl":{"type":"string"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/domain.ProjectColumn"}},"description":{"type":"string"},"features":{"$ref":"#/components/schemas/domain.ProjectFeatures"},"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.BoardResponse":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/apimodel.BoardProject"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TaskListItem"}}}},"apimodel.BulkResult":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"integer"}},"updated":{"type":"integer"}}},"apimodel.CalendarFeedResponse":{"type":"object","properties":{"token":{"type":"string","example":"deadbeef..."},"url":{"type":"string","example":"https://api.bugboard.ai/api/v1/calendar/deadbeef.ics"}}},"apimodel.CanvasExpandResponse":{"type":"object","properties":{"content":{"type":"string"}}},"apimodel.CanvasIdeasResponse":{"type":"object","properties":{"ideas":{"type":"array","items":{"type":"string"}}}},"apimodel.CanvasWidgetResponse":{"type":"object","properties":{"html":{"type":"string"}}},"apimodel.ChannelMemberResponse":{"type":"object","properties":{"canExecute":{"type":"boolean"},"canMention":{"description":"Capabilities. Three separate switches, not one \"agent enabled\" flag:\na channel can host an agent that answers but never remembers, which is\nwhat a private channel usually wants.","type":"boolean"},"canWriteMemory":{"type":"boolean"},"channelId":{"type":"integer"},"channelUuid":{"type":"string"},"createdAt":{"type":"string"},"historyFrom":{"type":"string"},"id":{"type":"integer"},"pinned":{"type":"boolean"},"role":{"type":"string"},"updatedAt":{"type":"string"},"userId":{"type":"integer"},"userUuid":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.ChannelMessage":{"type":"object","properties":{"attachments":{"description":"Attachments are the files on this message (migration 0056), in render\norder, and omitted entirely when there are none — which is the\noverwhelmingly common case, so a plain message costs no bytes for it.\n\nPopulated by the caller from ONE range query over the page's seq window,\nexactly like Reactions. Absent on a tombstone for the same reason the\nbody is blanked there: a deleted message must not still serve its\nscreenshot.\n\nThere is no URL here. Bytes are fetched through a short-lived signed URL\nminted per view (GET /channels/{uuid}/attachments/{attachmentUuid}/signed-url),\nbecause a durable link in a page read would be a capability that outlives\nthe caller's access to the channel — and a page of fifty messages would\nmint fifty of them that nobody looks at.","type":"array","items":{"$ref":"#/components/schemas/apimodel.MessageAttachment"}},"authorId":{"type":"integer"},"authorUuid":{"type":"string"},"body":{"description":"Body is empty on a tombstone — see ChannelMessageFrom.","type":"string"},"bodyUnreadable":{"description":"BodyUnreadable says the server could not decrypt this message and Body is\nempty for that reason. Absent (the overwhelmingly normal case) means Body\nis the real body, whatever it contains.\n\nThe client MUST render this as its own state — \"this message can't be\nread\" — and never as an empty message. An empty Body on its own does not\nimply it: a message carrying only attachments is stored with a genuinely\nempty body and is a completely ordinary message.\n\nEverything else on the row is still true and still rendered: who wrote it,\nwhen, its seq, its topic chip. The message is known to exist and known to\nbe unreadable, which is a far more useful thing to show somebody than\neither a fabricated body or a failed page.\n\nNever set on a tombstone. There the body is withheld on purpose and\n`deleted` already explains it; adding \"we could not read it\" would offer\na second, wrong explanation for the same blank.","type":"boolean"},"channelId":{"type":"integer"},"channelUuid":{"type":"string"},"contentType":{"type":"string"},"createdAt":{"type":"string"},"deleteReasonCode":{"type":"string"},"deleted":{"description":"Deleted plus DeletedAt describe a tombstone. The row is still returned\nso the cursor stays dense; the client renders a placeholder.","type":"boolean"},"deletedAt":{"type":"string"},"editedAt":{"type":"string"},"id":{"description":"ID is the server's row id. Unique across the table, but only half of the\nprimary key — never use it to address a message.","type":"integer"},"kind":{"description":"Kind is one of user, system, agent_turn; ContentType is text or markdown.","type":"string"},"reactions":{"description":"Reactions are the grouped emoji on this message (migration 0053), each\nwith a count and whether the requesting caller is in it.\n\nPopulated by the caller from ONE range query over the page's seq window,\nnever per message — see repository.ReactionRepository.Tallies. Omitted\nentirely when there are none, so the overwhelmingly common case costs\nfour bytes of JSON rather than an empty array on every row.\n\nThe reactor NAMES are deliberately absent. A pill renders a glyph and a\nnumber; who reacted is a bounded read behind the tooltip, because one\npopular message would otherwise put hundreds of uuids into a page that\nfifty messages share.","type":"array","items":{"$ref":"#/components/schemas/domain.ReactionTally"}},"replyToUuid":{"description":"ReplyToUUID points at the message this one quotes, or \"\" for none.\n\nA POINTER, not a container. The client renders it as an inline quoted\nbubble in the SAME stream and clicking it scrolls to the quoted message;\nit never opens a separate view. There is no thread id, no reply count and\nno \"also send to channel\", because there are no threads.","type":"string"},"seq":{"description":"Seq is the per-channel monotonic cursor. Dense: tombstones keep their\nseq, so a gap means the client missed something.","type":"integer"},"topicUuid":{"description":"TopicUUID is the message's topic TAG, or \"\" when it carries none.\n\nEvery message renders a chip from this, INCLUDING in the \"All\" tab — that\nis what lets a reader always see which lane a message belongs to without\nhaving navigated there, which is the property that makes topics a filter\nrather than a room. An empty value is completely normal: tagging is\noptional and untagged messages appear in All.\n\nIt is also empty when the message's topic has since been archived. The row\nkeeps its dead topic_id (0043 gives the column no foreign key on purpose)\nand the read resolves it to \"no tag\" — a message is never lost because\nsomebody tidied up a tab.","type":"string"},"uuid":{"description":"UUID is the client-minted UUIDv7 idempotency key.","type":"string"}}},"apimodel.ChannelMessagePage":{"type":"object","properties":{"hasMore":{"description":"HasMore is server-authoritative: it comes from asking for one row more\nthan the page size and seeing whether it arrived, never from comparing\nlen(messages) to the limit (which is wrong for the exact-multiple case).\nIt means \"more in the direction you are walking\" — older for `?before=`,\nnewer for `?after=`.","type":"boolean"},"limit":{"description":"Limit is the page size actually applied after clamping.","type":"integer"},"messages":{"description":"Messages are ordered by seq DESCENDING for a `?before=` page and\nASCENDING for an `?after=` page: each direction returns rows in the order\nit walked them, so the last element always carries the next cursor.","type":"array","items":{"$ref":"#/components/schemas/apimodel.ChannelMessage"}},"nextAfter":{"description":"NextAfter is the value to pass as ?after= for the next newer page.\nnil when HasMore is false, and always nil on a backward page.","type":"integer"},"nextBefore":{"description":"NextBefore is the value to pass as ?before= for the next older page.\nnil when HasMore is false, and always nil on a forward page.","type":"integer"}}},"apimodel.ChannelResponse":{"type":"object","properties":{"archivedAt":{"type":"string"},"authority":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"integer"},"kind":{"description":"Kind is channel | project | dm. There is no task kind and no thread kind\n— a task enters a conversation as an @BUG-241 mention, and a reply is an\ninline quoted bubble in the same stream.","type":"string"},"lastMessageAt":{"type":"string"},"lastMessageSeq":{"description":"LastMessageSeq is the channel's head pointer — the per-channel cursor of\nits newest message. Compared against LastReadSeq to decide unread; never\nsubtracted from it to produce a count, because the head counts tombstones\nand system events too.","type":"integer"},"lastReadSeq":{"type":"integer"},"mentionCount":{"type":"integer"},"name":{"description":"Name is populated only for kind='channel'. Every other kind derives its\nlabel from its anchor — the project's name, the DM's participants —\nwhich the client already holds locally.","type":"string"},"orgId":{"type":"integer"},"participantCount":{"description":"ParticipantCount is set for kind='dm' only, and is fixed at creation.","type":"integer"},"participants":{"description":"Participants names the OTHER people in a DM — everyone except the caller.\nEmpty for every other kind.\n\nA DM carries no name (0044's tagged-union CHECK makes channels.name null\nfor kind='dm'), so this is what lets a sidebar render \"Maya\" instead of\n\"Direct message\". The client resolves these against the org directory it\nalready holds; sending NAMES here instead would duplicate a directory that\nis already synced and would go stale the moment somebody is renamed.\n\nEach entry carries both the id and the uuid — see domain.DMParticipant\non why the two clients need different halves.","type":"array","items":{"$ref":"#/components/schemas/domain.DMParticipant"}},"pinned":{"type":"boolean"},"projectId":{"type":"integer"},"projectUuid":{"type":"string"},"role":{"description":"Role and Authority are the caller's, from the channel_access projection.","type":"string"},"topic":{"type":"string"},"topics":{"description":"Topics is the channel's tab bar, present on the single-channel read and\nabsent from the list (the dock draws icons, not tabs). Always non-nil\nwhen present, so a client never has to special-case null.","type":"array","items":{"$ref":"#/components/schemas/apimodel.TopicResponse"}},"topicsMoved":{"description":"TopicsMoved is the channel badge, and it counts TOPICS, not messages.\n\n\"2 topics\", never \"47\". A count of messages is noise nobody can act on; a\ncount of lanes that moved is a decision the reader can actually make.\nMuted lanes are excluded, so the number is exactly \"how many things here\nstill want my attention\". Stated in 0044's header; computed by\nChannelRepository.TopicsMoved.","type":"integer"},"unread":{"type":"boolean"},"updatedAt":{"type":"string"},"uuid":{"type":"string"},"visibility":{"description":"Visibility is public | private.","type":"string"}}},"apimodel.ChatChannelNotificationPref":{"type":"object","properties":{"channelUuid":{"type":"string"},"level":{"type":"string"}}},"apimodel.ChatHistoryResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/service.PersistedChatMessage"}}}},"apimodel.ChatMarkReadRequest":{"type":"object","properties":{"projectId":{"type":"integer","example":1},"taskNumber":{"type":"integer"}}},"apimodel.ChatMessage":{"type":"object","properties":{"content":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"integer","example":1},"userEmail":{"type":"string","example":"dev@bugboard.eu"},"userId":{"type":"integer","example":1}}},"apimodel.ChatNotificationPrefsResponse":{"type":"object","properties":{"default":{"description":"Default is `mentions` or `none`, always populated — a caller who has\nstored nothing gets the server's default rather than an empty string.","type":"string"},"levels":{"description":"Levels is every level this build accepts, so the settings UI renders the\nserver's vocabulary instead of a duplicated copy that can drift.","type":"array","items":{"type":"string"}},"overrides":{"description":"Overrides is never null; an empty object is the same information with no\nbranch on the client.","type":"array","items":{"$ref":"#/components/schemas/apimodel.ChatChannelNotificationPref"}}}},"apimodel.ClearChatResponse":{"type":"object","properties":{"cleared":{"type":"boolean","example":true}}},"apimodel.CommentUpdateResult":{"type":"object","properties":{"content":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"integer"},"updatedAt":{"type":"string"},"userId":{"type":"integer"}}},"apimodel.CommitActivityDay":{"type":"object","properties":{"count":{"type":"integer","example":3},"date":{"type":"string","example":"2026-05-27"}}},"apimodel.CommitActivityResponse":{"type":"object","properties":{"days":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.CommitActivityDay"}},"syncing":{"type":"boolean","example":false}}},"apimodel.ConfirmSimilarityRequest":{"type":"object","properties":{"kind":{"type":"string","example":"duplicates"}}},"apimodel.ConnectionTestResult":{"type":"object","properties":{"error":{"type":"string"},"ok":{"type":"boolean","example":true},"sha":{"type":"string"}}},"apimodel.ConversationItem":{"type":"object","properties":{"kind":{"type":"string","example":"task"},"lastAt":{"type":"string"},"preview":{"type":"string"},"previewBy":{"type":"string"},"projectId":{"type":"integer","example":1},"projectName":{"type":"string"},"subscribed":{"type":"boolean"},"taskId":{"type":"integer"},"taskNumber":{"type":"integer"},"taskType":{"type":"string"},"title":{"type":"string"},"unread":{"type":"integer","example":0}}},"apimodel.ConversationsResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.ConversationItem"}}}},"apimodel.CreateAPITokenRequest":{"type":"object","properties":{"expiresInDays":{"type":"integer","example":90},"name":{"type":"string","example":"ci-token"}}},"apimodel.CreateCommentRequest":{"type":"object","properties":{"content":{"type":"string","example":"Confirmed on staging."}}},"apimodel.CreateTaskLinkRequest":{"type":"object","properties":{"targetId":{"type":"integer","example":42},"type":{"type":"string","example":"blocks"}}},"apimodel.CreateWebhookRequest":{"type":"object","properties":{"events":{"type":"array","items":{"type":"string"}},"projectId":{"type":"integer"},"url":{"type":"string","example":"https://example.com/hook"}}},"apimodel.DeleteResult":{"type":"object","properties":{"deleted":{"type":"boolean"}}},"apimodel.DeletedResult":{"type":"object","properties":{"deleted":{"type":"boolean"}}},"apimodel.DraftedCommentResponse":{"type":"object","properties":{"content":{"type":"string"}}},"apimodel.EmailVerificationSentResponse":{"type":"object","properties":{"devCode":{"type":"string"},"sent":{"type":"boolean","example":true}}},"apimodel.Envelope":{"type":"object","properties":{"data":{"description":"Data is the endpoint-specific payload; see each *Response model."},"meta":{"description":"Meta carries the pagination descriptor on cursor-paginated endpoints and is\nabsent everywhere else — hence the pointer and omitempty, matching the\nruntime `Response[T]`.\n\nIt belongs HERE, not only on the runtime struct. This type is what every\n`@Success` annotation names, so it is what the generated Swift and Kotlin\nclients are built from. While it lacked `meta`, both clients silently\ndropped `nextCursor` on my-work and comments — the field arrived on the\nwire, the decoder had nowhere to put it, and page two was unreachable.\nBoth mobile lanes hit it independently and had to hand-write DTOs to work\naround it. A documentation type that omits a field the server really sends\nis not documentation, it is a bug with a schema attached.","allOf":[{"$ref":"#/components/schemas/apimodel.Meta"}]},"success":{"type":"boolean","example":true}}},"apimodel.ErrorCode":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","VALIDATION_ERROR","INTERNAL_ERROR","METHOD_NOT_ALLOWED","PAYLOAD_TOO_LARGE","RATE_LIMITED","INVALID_REQUEST","INVALID_ID","INVALID_TOKEN","INVALID_CURSOR","QUOTA_EXCEEDED","PROJECT_LIMIT_EXCEEDED","PLAN_LIMIT","ORG_CREATE_LIMIT","PLAN_UPGRADE_REQUIRED","AI_DISABLED","LAST_OWNER","CANNOT_TARGET_SELF","INVALID_ROLE_CHANGE","ENTROPY_FAILURE","ACCOUNT_DELETION_BLOCKED","REAUTH_FAILED","EMAIL_UNVERIFIED","EMAIL_ALREADY_VERIFIED","VERIFICATION_CODE_INVALID","BILLING_CANCEL_FAILED","TIMER_ALREADY_RUNNING","NO_RUNNING_TIMER","TIME_ENTRY_LOCKED","BILLING_ITEM_INVOICED","PUSH_NOT_CONFIGURED","IDEMPOTENCY_KEY_MISMATCH","IDEMPOTENCY_KEY_IN_PROGRESS"],"x-enum-varnames":["CodeBadRequest","CodeUnauthorized","CodeForbidden","CodeNotFound","CodeConflict","CodeValidationError","CodeInternalError","CodeMethodNotAllowed","CodePayloadTooLarge","CodeRateLimited","CodeInvalidRequest","CodeInvalidID","CodeInvalidToken","CodeInvalidCursor","CodeQuotaExceeded","CodeProjectLimitExceeded","CodePlanLimit","CodeOrgCreateLimit","CodePlanUpgradeRequired","CodeAIDisabled","CodeLastOwner","CodeCannotTargetSelf","CodeInvalidRoleChange","CodeEntropyFailure","CodeAccountDeletionBlocked","CodeReauthFailed","CodeEmailUnverified","CodeEmailAlreadyVerified","CodeVerificationCodeInvalid","CodeBillingCancelFailed","CodeTimerAlreadyRunning","CodeNoRunningTimer","CodeTimeEntryLocked","CodeBillingItemInvoiced","CodePushNotConfigured","CodeIdempotencyMismatch","CodeIdempotencyInProgress"]},"apimodel.ErrorEnvelope":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/apimodel.APIError"},"success":{"type":"boolean","example":false}}},"apimodel.FindingItem":{"type":"object","properties":{"content":{"type":"string"},"createdAt":{"type":"string"},"createdByRunId":{"type":"integer"},"id":{"type":"integer"},"key":{"type":"string"},"updatedAt":{"type":"string"}}},"apimodel.FindingWriteResult":{"type":"object","properties":{"content":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"updatedAt":{"type":"string"}}},"apimodel.FindingsListResponse":{"type":"object","properties":{"findings":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.FindingItem"}}}},"apimodel.GeneratedDescriptionResponse":{"type":"object","properties":{"description":{"type":"string"}}},"apimodel.GeneratedTitleResponse":{"type":"object","properties":{"title":{"type":"string"}}},"apimodel.GenericRepoCreatedResponse":{"type":"object","properties":{"connectionTest":{"$ref":"#/components/schemas/apimodel.ConnectionTestResult"},"publicKey":{"type":"string"},"repository":{"$ref":"#/components/schemas/domain.Repository"},"webhookEvents":{"type":"array","items":{"type":"string"}},"webhookSecret":{"type":"string"}}},"apimodel.GithubBranch":{"type":"object","properties":{"name":{"type":"string","example":"main"},"protected":{"type":"boolean","example":true}}},"apimodel.InitiativeOwner":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"integer"},"uuid":{"type":"string"}}},"apimodel.InitiativeResponse":{"type":"object","properties":{"color":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"endsAt":{"type":"string"},"id":{"type":"integer"},"linkedTasks":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TaskListItem"}},"orgId":{"type":"integer"},"owner":{"$ref":"#/components/schemas/apimodel.InitiativeOwner"},"ownerId":{"type":"integer"},"progress":{"type":"integer"},"projectId":{"type":"integer"},"startsAt":{"type":"string"},"status":{"$ref":"#/components/schemas/domain.InitiativeStatus"},"title":{"type":"string"},"updatedAt":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.InviteCreated":{"type":"object","properties":{"email":{"type":"string"},"expiresAt":{"type":"string"},"id":{"type":"integer"},"role":{"$ref":"#/components/schemas/domain.OrgRole"},"token":{"type":"string"}}},"apimodel.InviteInfo":{"type":"object","properties":{"expiresAt":{"type":"string"},"org":{"$ref":"#/components/schemas/apimodel.OrgRef"},"role":{"$ref":"#/components/schemas/domain.OrgRole"}}},"apimodel.LinkedIdentity":{"type":"object","properties":{"avatarUrl":{"type":"string"},"createdAt":{"type":"string"},"email":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"provider":{"type":"string"}}},"apimodel.LinkedResult":{"type":"object","properties":{"linked":{"type":"boolean"}}},"apimodel.LoginResponse":{"type":"object","properties":{"refreshToken":{"description":"RefreshToken is the first link of a rotation chain, redeemable at\nPOST /auth/refresh-token once `token` has expired. Omitted when the\ndeployment has refresh tokens disabled (REFRESH_TOKEN_EXPIRY <= 0);\nthe web client ignores it and keeps using the protected\nPOST /auth/refresh sliding window instead.","type":"string"},"token":{"type":"string","example":"eyJhbGciOi..."},"user":{"$ref":"#/components/schemas/apimodel.AuthUser"}}},"apimodel.MCPAuditListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.MCPCallLog"}},"total":{"type":"integer","example":42}}},"apimodel.MarkBulkResult":{"type":"object","properties":{"marked":{"type":"integer","example":7},"success":{"type":"boolean","example":true}}},"apimodel.MarkByEntityRequest":{"type":"object","properties":{"entityId":{"type":"integer","example":42},"entityType":{"type":"string","example":"bug"}}},"apimodel.MarkReadResult":{"type":"object","properties":{"success":{"type":"boolean","example":true}}},"apimodel.MarkedResponse":{"type":"object","properties":{"marked":{"type":"integer","example":3}}},"apimodel.MeResponse":{"type":"object","properties":{"avatarUrl":{"description":"AvatarURL is the caller's own avatar as a small `data:image/...`\nURL, empty when unset. It ships here so the account tile renders\nthe right face on first paint, without waiting for the org-wide\navatar map (see UserAvatarItem).","type":"string"},"email":{"type":"string","example":"dev@bugboard.eu"},"emailVerified":{"description":"EmailVerified: see AuthUser.EmailVerified.","type":"boolean","example":true},"id":{"type":"integer","example":1},"isAdmin":{"type":"boolean","example":false},"orgRole":{"type":"string","example":"owner"}}},"apimodel.MemberUser":{"type":"object","properties":{"displayName":{"description":"DisplayName is the person's own name (users.display_name, migration\n0049), or absent when they never set one.\n\nAbsent, NOT substituted. The fallback — the email's local part — is\napplied by the renderer, which already holds Email; sending the\nfallback in this field instead would make \"has this person named\nthemselves\" unanswerable from the wire, and a settings form has to be\nable to tell those apart to render an empty box.\n\nPopulated only where the source row is a hydrated domain.User.\ndomain.MemberPreview (the capped avatar-stack preview on project list\nrows) carries userId + email and nothing else by design, so the rows\nbuilt from it omit this and fall back — which is exactly what an\navatar stack, drawn from the email anyway, already did.","type":"string"},"email":{"type":"string"},"id":{"type":"integer"},"kind":{"description":"Kind distinguishes a person from an agent. Agents appear in the roster\nbecause they are ordinary channel members, but a member picker that\noffers \"invite to the org\" must not offer it for them.","type":"string"},"uuid":{"description":"UUID is what a chat client resolves a message author by.\n\nThe messages read path is deliberately joinless — messages carries no FK\nto users and never joins it, so a message payload can only ever carry\n`authorUuid`. A client with a local mirror (the web app) resolves that\nagainst its synced users table; a client without one (the macOS app) has\nnothing to resolve against unless the roster carries the same key. Without\nthis field every bubble in the native app renders as \"someone\".\n\nOmitted when zero so the surfaces that build a MemberUser from a row that\nhas no uuid loaded do not emit a misleading empty string.","type":"string"}}},"apimodel.Mention":{"type":"object","properties":{"authorId":{"type":"integer"},"channelUuid":{"type":"string"},"createdAt":{"type":"string"},"id":{"description":"ID is the keyset cursor for the next page. On the wire because the client\ncannot derive it: created_at is not unique across the mentions one\nmessage produces, so paging by timestamp can skip or repeat a row.","type":"integer"},"messageSeq":{"description":"MessageSeq is what a \"jump to message\" navigates by.","type":"integer"},"messageUuid":{"type":"string"},"readAt":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.MentionCount":{"type":"object","properties":{"cleared":{"type":"integer"},"unread":{"type":"integer"}}},"apimodel.MentionPage":{"type":"object","properties":{"mentions":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.Mention"}},"nextBefore":{"description":"NextBefore is the `?before=` value for the next older page; nil when the\ncaller has reached the end.","type":"integer"}}},"apimodel.MessageAttachment":{"type":"object","properties":{"createdAt":{"type":"string"},"isImage":{"description":"IsImage tells the client to render a thumbnail rather than a file card.\n\nDecided SERVER-side from the sniffed content type rather than left to the\nclient to infer from the name, so a `.png` full of something else is not\nput in an <img> by a renderer that trusted the extension.","type":"boolean"},"mimeType":{"type":"string"},"originalName":{"description":"OriginalName is what the uploader called the file. Rendered as the label\non a file card and used as the download filename.","type":"string"},"size":{"type":"integer"},"uploaderUuid":{"description":"UploaderUUID attributes the file. The integer id is deliberately absent:\na file is only ever rendered inside a message that already carries its\nauthor, and this is here for the case where they differ.","type":"string"},"uuid":{"type":"string"}}},"apimodel.MessageResponse":{"type":"object","properties":{"message":{"type":"string","example":"Done"}}},"apimodel.Meta":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer"},"nextCursor":{"type":"string"},"total":{"description":"Total is the full unfiltered count. Populated ONLY when the caller\nopts in with ?withTotal=1 (admin/analytics use); nil on the hot path.","type":"integer"}}},"apimodel.MyWorkItem":{"type":"object","properties":{"assignedTo":{"$ref":"#/components/schemas/apimodel.UserRef"},"assignedToEmail":{"type":"string"},"assignedToId":{"description":"The four fields below are the LEGACY single-assignee shape. They are\nDERIVED from Assignees (the lowest-id member, or absent when the set is\nempty) — nothing reads tasks.assigned_to_id to produce them. They exist\nbecause published clients, API-token consumers and the outbound-webhook\npayload still address assignment this way, and they are removed together\nwith the column by the contract migration.\n\nA task with several assignees reports ONE of them here. That is lossy by\nconstruction; any consumer that cares must read `assignees`.\n\nDeprecated: read assignees.","type":"integer"},"assignedToUuid":{"type":"string"},"assignees":{"description":"Assignees is the task's assignee SET — the authoritative field, sourced\nfrom `task_assignees`. Ordered by user id, so two reads of an unchanged\ntask produce the same array. Always present (never omitted); an empty\narray means unassigned.\n\nFilled on the list/board paths by ONE batched query for the whole page\n(repository.hydrateAssignees), the same per-page discipline as the\ncomment/attachment counts and the duplicate badge — never a per-row read.","type":"array","items":{"$ref":"#/components/schemas/apimodel.UserRef"}},"attachmentCount":{"type":"integer"},"closedAt":{"type":"string"},"commentCount":{"type":"integer"},"createdAt":{"type":"string"},"createdByEmail":{"type":"string"},"createdById":{"type":"integer"},"createdByUuid":{"type":"string"},"dueDate":{"description":"Planning scalars the board/calendar/sprint views read directly off the\nlist rows. Present (null when unset) rather than omitted so the\nfrontend's field access stays defined.","type":"string"},"duplicateCount":{"description":"DuplicateCount is how many still-open (\"suggested\") similarity pairs touch\nthis task — the \"possible duplicate\" badge count. Always 0 on a project\nwith the DuplicateDetection feature off, because a project with detection\noff has no open suggestions to show and the list path skips the aggregate\nentirely. Present (not omitted) so the frontend's field access stays\ndefined, matching the counts above.\n\nFilled by the list/board handlers from ONE batched aggregate per page\n(see TaskRepository.CountSuggestedDuplicatesByTaskIDs); the constructors\nbelow leave it zero because they build a single row and must not issue a\nper-row COUNT.","type":"integer"},"endDate":{"type":"string"},"estimatedMinutes":{"description":"EstimatedMinutes is the expected effort in real minutes. Present (null\nwhen unset) rather than omitted, like the planning scalars around it:\nnull means UNESTIMATED and must not render as zero, which would put an\nun-estimated task infinitely over budget on the Time strip's burn bar.","type":"integer"},"id":{"type":"integer"},"isSubscribed":{"description":"IsSubscribed reports whether the CALLING user watches this task — the\nboard's watch indicator. It is per-viewer, so unlike every other field on\nthis struct two users get different values for the same row; it must\nnever be cached across identities.\n\nThis is the COLD path only. The board reads the local PowerSync mirror\nwhenever the browser has synced, and derives the same answer from the\ncaller's own mirrored `task_subscribers` rows — a signal that existed only\nhere would render for a never-synced browser and for nobody else.\n\nFilled by the list/board handlers from ONE batched lookup per page (see\nTaskRepository.SubscribedTaskIDs); the constructors below leave it false\nbecause they build a single row and must not issue a per-row EXISTS.","type":"boolean"},"parentId":{"type":"integer"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"projectId":{"type":"integer"},"projectName":{"type":"string"},"projectSlug":{"type":"string"},"projectUuid":{"type":"string"},"pullRequestUrl":{"type":"string"},"scheduledAt":{"type":"string"},"severity":{"$ref":"#/components/schemas/domain.Severity"},"sprint":{"type":"string"},"startDate":{"type":"string"},"status":{"description":"A project COLUMN KEY, not a member of the domain.Status const set.\nColumns are user-configurable: project 44 in the dev data uses\nbacklog/doing/needs_qa/shipped/old_sprint, none of which are in that\nset. Typing this as the Go enum made swaggo emit a closed 4-value\nenum, and both generated mobile clients then threw on decode for every\ntask in such a project. `swaggertype:\"string\"` documents what the\nserver actually sends. Writes are still constrained — the request DTOs\nvalidate against the column set (see dto/task_dto.go).","type":"string"},"statusChangedAt":{"description":"StatusChangedAt is when the task last entered the status above — the\nonly thing that can answer \"how long has this been in progress?\", since\nthe activity log records that a task changed, not what changed about it.\nPresent (null when unknown) rather than omitted, like the planning dates\nbelow: null means no transition was ever observed and must render as\nunknown, NOT as zero elapsed. TaskDetail embeds this struct, so the\nfield reaches the detail shape too.","type":"string"},"storyPoints":{"type":"integer"},"subIssueCount":{"description":"SubIssueCount / SubIssueDoneCount are the done/total roll-up over this\ntask's DIRECT children — the \"2/5\" chip on a board card.\n\nThese exist because the client-side roll-up is exact only on the LOCAL\npath, where the mirror query is unpaginated and selects every task in the\nproject. The cold path is paginated and /board is both capped and filtered\nto non-done tasks, so children the page never loaded are invisible and a\nparent's roll-up under-reports — which is worse than absent, because a\nwrong \"1/2\" reads as authoritative.\n\n\"Done\" is the owning column's SEMANTIC type (done/archive), resolved\nagainst the CHILD's own project, never a literal `status = 'done'`:\nprojects rename their final column, and such a project has no task whose\nstatus is the string \"done\" at all.\n\nFilled by the list/board handlers from ONE batched aggregate per page (see\nTaskRepository.SubIssueRollupsByParentIDs); a task with no children has\nboth at zero, which is indistinguishable from — and means the same as —\n\"no sub-issues to roll up\".","type":"integer"},"subIssueDoneCount":{"type":"integer"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/domain.Tag"}},"taskId":{"type":"integer"},"testStatus":{"description":"TestStatus is only meaningful on test-type tasks (Testing view); it is\nempty on the bug/feature/change rows a normal board shows.","allOf":[{"$ref":"#/components/schemas/domain.TestFeatureStatus"}]},"timeSpentMinutes":{"type":"integer"},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/domain.TaskType"},"updatedAt":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.NotificationListMeta":{"type":"object","properties":{"page":{"type":"integer","example":1},"perPage":{"type":"integer","example":50},"total":{"type":"integer","example":120},"totalPages":{"type":"integer","example":3}}},"apimodel.NotificationListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/domain.NotificationWithActor"}},"meta":{"$ref":"#/components/schemas/apimodel.NotificationListMeta"},"success":{"type":"boolean","example":true},"unreadCount":{"type":"integer","example":4}}},"apimodel.OAuthExchangeRequest":{"type":"object","properties":{"ticket":{"type":"string"}}},"apimodel.OAuthProvidersResponse":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string"}}}},"apimodel.OKCountResponse":{"type":"object","properties":{"count":{"type":"integer","example":3},"ok":{"type":"boolean","example":true}}},"apimodel.OKResponse":{"type":"object","properties":{"ok":{"type":"boolean","example":true}}},"apimodel.OrgBillingSettings":{"type":"object","properties":{"currency":{"type":"string"},"defaultBillableCents":{"type":"integer"},"defaultCostCents":{"type":"integer"},"orgId":{"type":"integer"}}},"apimodel.OrgDetail":{"type":"object","properties":{"aiEnabled":{"type":"boolean"},"aiQueriesLimit":{"type":"integer"},"aiQueriesUsed":{"type":"integer"},"avatarUrl":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"integer"},"memberCount":{"type":"integer"},"name":{"type":"string"},"plan":{"$ref":"#/components/schemas/domain.Plan"},"slug":{"type":"string"}}},"apimodel.OrgListItem":{"type":"object","properties":{"avatarUrl":{"type":"string"},"id":{"type":"integer"},"memberCount":{"type":"integer"},"name":{"type":"string"},"plan":{"$ref":"#/components/schemas/domain.Plan"},"slug":{"type":"string"}}},"apimodel.OrgMemberItem":{"type":"object","properties":{"id":{"type":"integer"},"joinedAt":{"type":"string"},"role":{"$ref":"#/components/schemas/domain.OrgRole"},"user":{"$ref":"#/components/schemas/apimodel.MemberUser"},"userId":{"type":"integer"}}},"apimodel.OrgMemberOption":{"type":"object","properties":{"id":{"type":"integer"},"role":{"$ref":"#/components/schemas/domain.OrgRole"},"user":{"$ref":"#/components/schemas/apimodel.MemberUser"},"userId":{"type":"integer"}}},"apimodel.OrgRef":{"type":"object","properties":{"avatarUrl":{"description":"AvatarURL is the org's small `data:image/...` avatar. It ships with\nthe ref so the public invite-accept page can render the org's real\nlogo instead of falling back to name initials. No extra exposure:\nthis endpoint already returns the org name to the same audience.","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"}}},"apimodel.OrgRepositoryView":{"type":"object","properties":{"cloneUrl":{"type":"string"},"defaultBranch":{"type":"string","example":"main"},"fileCount":{"type":"integer","example":0},"host":{"type":"string","example":"github.com"},"id":{"type":"integer","example":1},"indexedBranch":{"type":"string","example":"main"},"isPrimary":{"type":"boolean","example":false},"jobStatus":{"type":"string"},"lastIndexedAt":{"type":"string"},"lastIndexedSha":{"type":"string"},"lastPushedSha":{"type":"string"},"name":{"type":"string","example":"web"},"orgId":{"type":"integer","example":1},"owner":{"type":"string","example":"acme"},"provider":{"type":"string","example":"github_app"},"providerRepoId":{"type":"integer","example":987654}}},"apimodel.OrgSummary":{"type":"object","properties":{"aiEnabled":{"type":"boolean"},"avatarUrl":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"plan":{"$ref":"#/components/schemas/domain.Plan"},"slug":{"type":"string"}}},"apimodel.PresenceResponse":{"type":"object","properties":{"presence":{"type":"array","items":{"$ref":"#/components/schemas/domain.PresenceView"}}}},"apimodel.ProjectConversationsResponse":{"type":"object","properties":{"general":{"$ref":"#/components/schemas/apimodel.ConversationItem"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.ConversationItem"}}}},"apimodel.ProjectDetailResponse":{"type":"object","properties":{"archived":{"type":"boolean"},"avatarUrl":{"type":"string"},"bugCount":{"type":"integer"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/domain.ProjectColumn"}},"createdAt":{"type":"string"},"description":{"type":"string"},"featureCount":{"type":"integer"},"featureStats":{"$ref":"#/components/schemas/domain.FeatureStats"},"features":{"$ref":"#/components/schemas/domain.ProjectFeatures"},"githubDefaultBranch":{"type":"string"},"githubInstallationId":{"type":"integer"},"githubRepoName":{"type":"string"},"githubRepoOwner":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"openBugCount":{"type":"integer"},"openFeatureCount":{"type":"integer"},"openTaskCount":{"type":"integer","example":9},"slug":{"type":"string"},"stats":{"$ref":"#/components/schemas/domain.BugStats"},"taskCount":{"description":"Across EVERY task type. `stats` is bug-only and `featureStats` is\nfeature-only, so change and test tasks appear in neither and a client\nshowing one \"N open\" figure from them undercounts. Use this for that.","type":"integer","example":12},"uuid":{"type":"string"}}},"apimodel.ProjectMemberItem":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer"},"projectId":{"type":"integer"},"role":{"$ref":"#/components/schemas/domain.ProjectRole"},"user":{"$ref":"#/components/schemas/apimodel.MemberUser"},"userId":{"type":"integer"}}},"apimodel.ProjectResource":{"type":"object","properties":{"archived":{"type":"boolean"},"avatarUrl":{"type":"string"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/domain.ProjectColumn"}},"createdAt":{"type":"string"},"description":{"type":"string"},"features":{"$ref":"#/components/schemas/domain.ProjectFeatures"},"githubDefaultBranch":{"type":"string"},"githubInstallationId":{"type":"integer"},"githubRepoName":{"type":"string"},"githubRepoOwner":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.ProjectSubscription":{"type":"object","properties":{"level":{"$ref":"#/components/schemas/domain.ProjectSubscriptionLevel"},"projectId":{"type":"integer"}}},"apimodel.ProjectSummary":{"type":"object","properties":{"archived":{"type":"boolean"},"avatarUrl":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"featureStats":{"$ref":"#/components/schemas/domain.FeatureStats"},"githubDefaultBranch":{"type":"string"},"githubInstallationId":{"type":"integer"},"githubRepoName":{"type":"string"},"githubRepoOwner":{"type":"string"},"id":{"type":"integer"},"memberCount":{"type":"integer"},"members":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.MemberUser"}},"name":{"type":"string"},"openTaskCount":{"type":"integer","example":9},"slug":{"type":"string"},"stats":{"$ref":"#/components/schemas/domain.BugStats"},"taskCount":{"description":"Across EVERY task type. `stats` is bug-only and `featureStats` is\nfeature-only, so change and test tasks are in neither — project 22 has 7\nbugs + 3 features + 2 changes, and a card summing the two stats blocks\nreports 10 of 12. Both mobile clients undercounted \"N open\" for exactly\nthis reason. One headline number belongs here.","type":"integer","example":12}}},"apimodel.ProjectTimeSummary":{"type":"object","properties":{"billableMinutes":{"type":"integer"},"byTask":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TaskTimeBreakdown"}},"byUser":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.UserTimeBreakdown"}},"currency":{"type":"string"},"from":{"type":"string"},"items":{"description":"Items and Currency are admin-only; both are absent for a member.","type":"array","items":{"$ref":"#/components/schemas/apimodel.BillingItem"}},"projectId":{"type":"integer"},"to":{"type":"string"},"totalMinutes":{"type":"integer"},"unratedEntryCount":{"description":"UnratedEntryCount drives the \"N entries have no rate. Apply current\nrates?\" banner. Sent to everyone: it counts entries, not money, and the\nunset-rate trap of docs §5 is invisible without it.","type":"integer"}}},"apimodel.PushDeviceResponse":{"type":"object","properties":{"appVersion":{"description":"AppVersion is the build recorded at registration.","type":"string","example":"1.4.0"},"id":{"type":"integer"},"lastSeenAt":{"description":"LastSeenAt is when this registration was last refreshed.","type":"string"},"platform":{"description":"Platform is \"apns\" or \"fcm\".","type":"string","example":"apns"}}},"apimodel.PushPreferencesResponse":{"type":"object","properties":{"enabled":{"description":"Enabled is the master switch; true for a user who has never changed it.","type":"boolean","example":true},"mutedTypes":{"description":"MutedTypes lists the notification types the user has explicitly\nturned off, sorted. Types the user never touched are absent and are\ndelivered.","type":"array","items":{"type":"string"}},"quietHoursEnd":{"type":"string","example":"07:00"},"quietHoursStart":{"description":"QuietHoursStart / QuietHoursEnd / QuietHoursTimeZone describe the\nnightly no-push window, or are all empty when none is set. End <=\nStart means the window wraps past midnight.","type":"string","example":"22:00"},"quietHoursTimeZone":{"type":"string","example":"Europe/Athens"}}},"apimodel.ReactorsResponse":{"type":"object","properties":{"userUuids":{"description":"UserUUIDs are oldest-first and capped. The client resolves them to people\nthrough the roster it already holds — this endpoint deliberately does not\njoin users, matching every other chat read.","type":"array","items":{"type":"string"}}}},"apimodel.RefreshResponse":{"type":"object","properties":{"expiresAt":{"type":"integer","example":1750000000},"token":{"type":"string","example":"eyJhbGciOi..."},"user":{"$ref":"#/components/schemas/apimodel.AuthUser"}}},"apimodel.RefreshTokenRequest":{"type":"object","properties":{"refreshToken":{"type":"string","example":"3f2a...c91"}}},"apimodel.RefreshTokenResponse":{"type":"object","properties":{"expiresAt":{"type":"integer","example":1750000000},"refreshExpiresAt":{"description":"RefreshExpiresAt is when the whole chain dies if unused\n(REFRESH_TOKEN_EXPIRY, 7 days by default). Rotation does NOT slide it\nforward past this from the original login — each successor gets a full\nwindow from its own issue time, so an app used weekly stays signed in\nand one abandoned for a month does not.","type":"integer","example":1750600000},"refreshToken":{"description":"RefreshToken replaces the one that was just spent (rotation).","type":"string","example":"9b7d...4ae"},"token":{"type":"string","example":"eyJhbGciOi..."},"user":{"$ref":"#/components/schemas/apimodel.AuthUser"}}},"apimodel.RegisterResponse":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/apimodel.AuthOrg"},"refreshToken":{"description":"RefreshToken — see LoginResponse.RefreshToken.","type":"string"},"token":{"type":"string","example":"eyJhbGciOi..."},"user":{"$ref":"#/components/schemas/apimodel.AuthUser"}}},"apimodel.ReindexResponse":{"type":"object","properties":{"jobId":{"type":"integer","example":1},"kind":{"allOf":[{"$ref":"#/components/schemas/domain.JobKind"}],"example":"index"},"status":{"allOf":[{"$ref":"#/components/schemas/domain.JobStatus"}],"example":"pending"}}},"apimodel.RemovedResult":{"type":"object","properties":{"removed":{"type":"boolean","example":true}}},"apimodel.RepoBranchesResponse":{"type":"object","properties":{"branches":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.GithubBranch"}},"hint":{"type":"string"}}},"apimodel.RepositoryPreference":{"type":"object","properties":{"isDefaultForBugs":{"type":"boolean","example":true},"repositoryId":{"type":"integer","example":1}}},"apimodel.RepositoryWithStats":{"type":"object","properties":{"cloneUrl":{"type":"string"},"commitActivitySyncedAt":{"description":"CommitActivitySyncedAt records the last time the commit-activity\nheatmap cache (repo_commit_days) was refreshed from the GitHub\nstats API for this repo. Nil means never synced. The project\ncommit-activity endpoint triggers a background re-sync when this is\nnil or older than the staleness TTL (~6h).","type":"string"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"credentialId":{"type":"integer"},"defaultBranch":{"type":"string"},"fileCount":{"type":"integer","example":0},"host":{"type":"string"},"id":{"type":"integer"},"indexedBranch":{"type":"string"},"isOrgDefault":{"description":"IsPrimary survived the org-level lift but its meaning shifted:\nwhere it used to mean \"primary repo for THIS project\", it now means\n\"this repo is the org's default suggestion in repo pickers\". The\ncolumn name is kept for migration simplicity; the JSON field is\nrenamed to `isOrgDefault` so frontend reads stay self-explanatory.","type":"boolean"},"jobStatus":{"type":"string"},"lastIndexedAt":{"type":"string"},"lastIndexedSha":{"type":"string"},"lastPushedSha":{"type":"string"},"name":{"type":"string"},"orgId":{"type":"integer"},"owner":{"type":"string"},"provider":{"type":"string"},"providerRepoId":{"type":"integer"},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"apimodel.RequestCodeRequest":{"type":"object","properties":{"email":{"type":"string","example":"dev@bugboard.eu"}}},"apimodel.RequestCodeResponse":{"type":"object","properties":{"devCode":{"type":"string"},"sent":{"type":"boolean","example":true}}},"apimodel.RequesterProject":{"type":"object","properties":{"archived":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"}}},"apimodel.SSETicketRequest":{"type":"object","properties":{"stream":{"type":"string","example":"canvas:12"}}},"apimodel.SSETicketResponse":{"type":"object","properties":{"expiresAt":{"type":"integer"},"stream":{"type":"string"},"ticket":{"type":"string"}}},"apimodel.SSHKeyPreviewResponse":{"type":"object","properties":{"fingerprint":{"type":"string"},"publicKey":{"type":"string"}}},"apimodel.SavedFilterResponse":{"type":"object","properties":{"config":{"type":"object"},"createdAt":{"type":"string"},"createdById":{"type":"integer"},"icon":{"type":"string"},"id":{"type":"integer"},"isLocked":{"type":"boolean"},"name":{"type":"string"},"orgId":{"type":"integer"},"pinned":{"type":"boolean"},"projectId":{"type":"integer"},"scope":{"$ref":"#/components/schemas/domain.SavedFilterScope"},"sortOrder":{"type":"integer"},"updatedAt":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.SetRequestersRequest":{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"integer"}}}},"apimodel.SignedURLResponse":{"type":"object","properties":{"expiresAt":{"type":"integer","example":1750000900},"url":{"type":"string","example":"/api/v1/attachments/1/view?token=...&exp=..."}}},"apimodel.SimilarityConfirmResult":{"type":"object","properties":{"confirmed":{"type":"boolean"}}},"apimodel.SimilarityDismissResult":{"type":"object","properties":{"dismissed":{"type":"boolean"}}},"apimodel.SimilarityScanResult":{"type":"object","properties":{"created":{"description":"Created is how many NEW suggested pairs this scan wrote.","type":"integer"},"open":{"description":"Open is how many suggestions are currently status=suggested in the\nproject after the scan (including pairs that were already open).","type":"integer"},"queued":{"description":"Queued is always false now (kept for older clients that only read this\nfield — they treat a 200 as \"scan accepted\"). Prefer created/open.","type":"boolean"}}},"apimodel.SimilaritySuggestions":{"type":"object","properties":{"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/domain.SimilarTaskRef"}}}},"apimodel.SnoozeResult":{"type":"object","properties":{"snoozed":{"type":"boolean"}}},"apimodel.SprintEndResult":{"type":"object","properties":{"doneCount":{"type":"integer"},"ended":{"type":"boolean"},"taskCount":{"type":"integer"}}},"apimodel.SprintListResponse":{"type":"object","properties":{"active":{"$ref":"#/components/schemas/domain.Sprint"},"history":{"type":"array","items":{"$ref":"#/components/schemas/domain.Sprint"}}}},"apimodel.StartTrialResponse":{"type":"object","properties":{"plan":{"type":"string","example":"starter"},"revertsTo":{"type":"string","example":"free"},"trialEndsAt":{"type":"string","example":"2026-11-27T09:00:00Z"}}},"apimodel.SubscriptionLevelResponse":{"type":"object","properties":{"level":{"$ref":"#/components/schemas/domain.ProjectSubscriptionLevel"}}},"apimodel.SubscriptionResult":{"type":"object","properties":{"subscribed":{"type":"boolean"}}},"apimodel.SubscriptionState":{"type":"object","properties":{"count":{"type":"integer"},"subscribed":{"type":"boolean"}}},"apimodel.TaskAnchor":{"type":"object","properties":{"assigneeIds":{"description":"AssigneeIDs is everyone on the task, ascending. Empty when nobody is —\nnever null, so a client can iterate it without a guard.","type":"array","items":{"type":"integer"}},"projectId":{"type":"integer"},"status":{"description":"Status is the task's CURRENT column, which is the whole reason a chip\nbeats a plain link.","type":"string"},"taskId":{"description":"TaskID is the server's row id.","type":"integer"},"taskNumber":{"description":"TaskNumber is the per-PROJECT number in \"BUG-241\". Task numbers are\nunique per project, NOT per org, which is why a resolve is always scoped\nto a channel.","type":"integer"},"title":{"description":"Title is the task's current title.","type":"string"},"type":{"description":"Type is the task type the display prefix named: bug | feature | change | test.","type":"string"},"uuid":{"description":"UUID is the task's client-facing uuid — the same key a local-first\nclient's mirror uses, so one cache can hold rows from either source.","type":"string"}}},"apimodel.TaskDetail":{"type":"object","properties":{"agentMemory":{"type":"string"},"areaId":{"description":"Testing-only fields (Type == \"test\").","type":"integer"},"assignedTo":{"$ref":"#/components/schemas/apimodel.UserRef"},"assignedToEmail":{"type":"string"},"assignedToId":{"description":"The four fields below are the LEGACY single-assignee shape. They are\nDERIVED from Assignees (the lowest-id member, or absent when the set is\nempty) — nothing reads tasks.assigned_to_id to produce them. They exist\nbecause published clients, API-token consumers and the outbound-webhook\npayload still address assignment this way, and they are removed together\nwith the column by the contract migration.\n\nA task with several assignees reports ONE of them here. That is lossy by\nconstruction; any consumer that cares must read `assignees`.\n\nDeprecated: read assignees.","type":"integer"},"assignedToUuid":{"type":"string"},"assignees":{"description":"Assignees is the task's assignee SET — the authoritative field, sourced\nfrom `task_assignees`. Ordered by user id, so two reads of an unchanged\ntask produce the same array. Always present (never omitted); an empty\narray means unassigned.\n\nFilled on the list/board paths by ONE batched query for the whole page\n(repository.hydrateAssignees), the same per-page discipline as the\ncomment/attachment counts and the duplicate badge — never a per-row read.","type":"array","items":{"$ref":"#/components/schemas/apimodel.UserRef"}},"attachmentCount":{"type":"integer"},"checks":{"type":"array","items":{"type":"string"}},"closedAt":{"type":"string"},"codingAgentRunId":{"type":"string"},"commentCount":{"type":"integer"},"createdAt":{"type":"string"},"createdByEmail":{"type":"string"},"createdById":{"type":"integer"},"createdByUuid":{"type":"string"},"description":{"type":"string"},"dueDate":{"description":"Planning scalars the board/calendar/sprint views read directly off the\nlist rows. Present (null when unset) rather than omitted so the\nfrontend's field access stays defined.","type":"string"},"duplicateCount":{"description":"DuplicateCount is how many still-open (\"suggested\") similarity pairs touch\nthis task — the \"possible duplicate\" badge count. Always 0 on a project\nwith the DuplicateDetection feature off, because a project with detection\noff has no open suggestions to show and the list path skips the aggregate\nentirely. Present (not omitted) so the frontend's field access stays\ndefined, matching the counts above.\n\nFilled by the list/board handlers from ONE batched aggregate per page\n(see TaskRepository.CountSuggestedDuplicatesByTaskIDs); the constructors\nbelow leave it zero because they build a single row and must not issue a\nper-row COUNT.","type":"integer"},"endDate":{"type":"string"},"estimatedMinutes":{"description":"EstimatedMinutes is the expected effort in real minutes. Present (null\nwhen unset) rather than omitted, like the planning scalars around it:\nnull means UNESTIMATED and must not render as zero, which would put an\nun-estimated task infinitely over budget on the Time strip's burn bar.","type":"integer"},"githubBranch":{"type":"string"},"githubPrNumber":{"type":"integer"},"id":{"type":"integer"},"isSubscribed":{"description":"Per-viewer subscription rollup — present only when the subscriber\nservice is wired (the detail endpoint folds it in).","type":"boolean"},"parentId":{"type":"integer"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"projectId":{"type":"integer"},"projectUuid":{"type":"string"},"pullRequestUrl":{"type":"string"},"scheduledAt":{"type":"string"},"severity":{"$ref":"#/components/schemas/domain.Severity"},"sprint":{"type":"string"},"startDate":{"type":"string"},"status":{"description":"A project COLUMN KEY, not a member of the domain.Status const set.\nColumns are user-configurable: project 44 in the dev data uses\nbacklog/doing/needs_qa/shipped/old_sprint, none of which are in that\nset. Typing this as the Go enum made swaggo emit a closed 4-value\nenum, and both generated mobile clients then threw on decode for every\ntask in such a project. `swaggertype:\"string\"` documents what the\nserver actually sends. Writes are still constrained — the request DTOs\nvalidate against the column set (see dto/task_dto.go).","type":"string"},"statusChangedAt":{"description":"StatusChangedAt is when the task last entered the status above — the\nonly thing that can answer \"how long has this been in progress?\", since\nthe activity log records that a task changed, not what changed about it.\nPresent (null when unknown) rather than omitted, like the planning dates\nbelow: null means no transition was ever observed and must render as\nunknown, NOT as zero elapsed. TaskDetail embeds this struct, so the\nfield reaches the detail shape too.","type":"string"},"storyPoints":{"type":"integer"},"subIssueCount":{"description":"SubIssueCount / SubIssueDoneCount are the done/total roll-up over this\ntask's DIRECT children — the \"2/5\" chip on a board card.\n\nThese exist because the client-side roll-up is exact only on the LOCAL\npath, where the mirror query is unpaginated and selects every task in the\nproject. The cold path is paginated and /board is both capped and filtered\nto non-done tasks, so children the page never loaded are invisible and a\nparent's roll-up under-reports — which is worse than absent, because a\nwrong \"1/2\" reads as authoritative.\n\n\"Done\" is the owning column's SEMANTIC type (done/archive), resolved\nagainst the CHILD's own project, never a literal `status = 'done'`:\nprojects rename their final column, and such a project has no task whose\nstatus is the string \"done\" at all.\n\nFilled by the list/board handlers from ONE batched aggregate per page (see\nTaskRepository.SubIssueRollupsByParentIDs); a task with no children has\nboth at zero, which is indistinguishable from — and means the same as —\n\"no sub-issues to roll up\".","type":"integer"},"subIssueDoneCount":{"type":"integer"},"subIssues":{"description":"SubIssues are the direct children, hydrated only on the detail read.","type":"array","items":{"$ref":"#/components/schemas/apimodel.TaskListItem"}},"subscriberCount":{"type":"integer"},"substate":{"description":"Agent-pipeline + integration fields (bug-centric; empty on plain tasks).","allOf":[{"$ref":"#/components/schemas/domain.Substate"}]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/domain.Tag"}},"targetBranch":{"type":"string"},"taskId":{"type":"integer"},"testStatus":{"description":"TestStatus is only meaningful on test-type tasks (Testing view); it is\nempty on the bug/feature/change rows a normal board shows.","allOf":[{"$ref":"#/components/schemas/domain.TestFeatureStatus"}]},"timeSpentMinutes":{"type":"integer"},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/domain.TaskType"},"updatedAt":{"type":"string"},"uuid":{"type":"string"},"widgetHtml":{"type":"string"}}},"apimodel.TaskLinks":{"type":"object","properties":{"incoming":{"type":"array","items":{"$ref":"#/components/schemas/domain.TaskLinkWithRef"}},"outgoing":{"type":"array","items":{"$ref":"#/components/schemas/domain.TaskLinkWithRef"}}}},"apimodel.TaskListItem":{"type":"object","properties":{"assignedTo":{"$ref":"#/components/schemas/apimodel.UserRef"},"assignedToEmail":{"type":"string"},"assignedToId":{"description":"The four fields below are the LEGACY single-assignee shape. They are\nDERIVED from Assignees (the lowest-id member, or absent when the set is\nempty) — nothing reads tasks.assigned_to_id to produce them. They exist\nbecause published clients, API-token consumers and the outbound-webhook\npayload still address assignment this way, and they are removed together\nwith the column by the contract migration.\n\nA task with several assignees reports ONE of them here. That is lossy by\nconstruction; any consumer that cares must read `assignees`.\n\nDeprecated: read assignees.","type":"integer"},"assignedToUuid":{"type":"string"},"assignees":{"description":"Assignees is the task's assignee SET — the authoritative field, sourced\nfrom `task_assignees`. Ordered by user id, so two reads of an unchanged\ntask produce the same array. Always present (never omitted); an empty\narray means unassigned.\n\nFilled on the list/board paths by ONE batched query for the whole page\n(repository.hydrateAssignees), the same per-page discipline as the\ncomment/attachment counts and the duplicate badge — never a per-row read.","type":"array","items":{"$ref":"#/components/schemas/apimodel.UserRef"}},"attachmentCount":{"type":"integer"},"closedAt":{"type":"string"},"commentCount":{"type":"integer"},"createdAt":{"type":"string"},"createdByEmail":{"type":"string"},"createdById":{"type":"integer"},"createdByUuid":{"type":"string"},"dueDate":{"description":"Planning scalars the board/calendar/sprint views read directly off the\nlist rows. Present (null when unset) rather than omitted so the\nfrontend's field access stays defined.","type":"string"},"duplicateCount":{"description":"DuplicateCount is how many still-open (\"suggested\") similarity pairs touch\nthis task — the \"possible duplicate\" badge count. Always 0 on a project\nwith the DuplicateDetection feature off, because a project with detection\noff has no open suggestions to show and the list path skips the aggregate\nentirely. Present (not omitted) so the frontend's field access stays\ndefined, matching the counts above.\n\nFilled by the list/board handlers from ONE batched aggregate per page\n(see TaskRepository.CountSuggestedDuplicatesByTaskIDs); the constructors\nbelow leave it zero because they build a single row and must not issue a\nper-row COUNT.","type":"integer"},"endDate":{"type":"string"},"estimatedMinutes":{"description":"EstimatedMinutes is the expected effort in real minutes. Present (null\nwhen unset) rather than omitted, like the planning scalars around it:\nnull means UNESTIMATED and must not render as zero, which would put an\nun-estimated task infinitely over budget on the Time strip's burn bar.","type":"integer"},"id":{"type":"integer"},"isSubscribed":{"description":"IsSubscribed reports whether the CALLING user watches this task — the\nboard's watch indicator. It is per-viewer, so unlike every other field on\nthis struct two users get different values for the same row; it must\nnever be cached across identities.\n\nThis is the COLD path only. The board reads the local PowerSync mirror\nwhenever the browser has synced, and derives the same answer from the\ncaller's own mirrored `task_subscribers` rows — a signal that existed only\nhere would render for a never-synced browser and for nobody else.\n\nFilled by the list/board handlers from ONE batched lookup per page (see\nTaskRepository.SubscribedTaskIDs); the constructors below leave it false\nbecause they build a single row and must not issue a per-row EXISTS.","type":"boolean"},"parentId":{"type":"integer"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"projectId":{"type":"integer"},"projectUuid":{"type":"string"},"pullRequestUrl":{"type":"string"},"scheduledAt":{"type":"string"},"severity":{"$ref":"#/components/schemas/domain.Severity"},"sprint":{"type":"string"},"startDate":{"type":"string"},"status":{"description":"A project COLUMN KEY, not a member of the domain.Status const set.\nColumns are user-configurable: project 44 in the dev data uses\nbacklog/doing/needs_qa/shipped/old_sprint, none of which are in that\nset. Typing this as the Go enum made swaggo emit a closed 4-value\nenum, and both generated mobile clients then threw on decode for every\ntask in such a project. `swaggertype:\"string\"` documents what the\nserver actually sends. Writes are still constrained — the request DTOs\nvalidate against the column set (see dto/task_dto.go).","type":"string"},"statusChangedAt":{"description":"StatusChangedAt is when the task last entered the status above — the\nonly thing that can answer \"how long has this been in progress?\", since\nthe activity log records that a task changed, not what changed about it.\nPresent (null when unknown) rather than omitted, like the planning dates\nbelow: null means no transition was ever observed and must render as\nunknown, NOT as zero elapsed. TaskDetail embeds this struct, so the\nfield reaches the detail shape too.","type":"string"},"storyPoints":{"type":"integer"},"subIssueCount":{"description":"SubIssueCount / SubIssueDoneCount are the done/total roll-up over this\ntask's DIRECT children — the \"2/5\" chip on a board card.\n\nThese exist because the client-side roll-up is exact only on the LOCAL\npath, where the mirror query is unpaginated and selects every task in the\nproject. The cold path is paginated and /board is both capped and filtered\nto non-done tasks, so children the page never loaded are invisible and a\nparent's roll-up under-reports — which is worse than absent, because a\nwrong \"1/2\" reads as authoritative.\n\n\"Done\" is the owning column's SEMANTIC type (done/archive), resolved\nagainst the CHILD's own project, never a literal `status = 'done'`:\nprojects rename their final column, and such a project has no task whose\nstatus is the string \"done\" at all.\n\nFilled by the list/board handlers from ONE batched aggregate per page (see\nTaskRepository.SubIssueRollupsByParentIDs); a task with no children has\nboth at zero, which is indistinguishable from — and means the same as —\n\"no sub-issues to roll up\".","type":"integer"},"subIssueDoneCount":{"type":"integer"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/domain.Tag"}},"taskId":{"type":"integer"},"testStatus":{"description":"TestStatus is only meaningful on test-type tasks (Testing view); it is\nempty on the bug/feature/change rows a normal board shows.","allOf":[{"$ref":"#/components/schemas/domain.TestFeatureStatus"}]},"timeSpentMinutes":{"type":"integer"},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/domain.TaskType"},"updatedAt":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.TaskTimeBreakdown":{"type":"object","properties":{"billableCents":{"type":"integer"},"contributorCount":{"type":"integer"},"costCents":{"type":"integer"},"minutes":{"type":"integer"},"taskId":{"type":"integer"},"taskNumber":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}}},"apimodel.TaskTimeSummary":{"type":"object","properties":{"contributors":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TimeContributor"}},"currency":{"type":"string"},"estimatedMinutes":{"description":"EstimatedMinutes lets the Time strip render \"3h of 5h estimated\" from\nthis one response. Despite sitting next to them it is NOT one of the\nadmin-only fields below — effort is not money, so §7 does not withhold\nit and a member sees the same value an admin does. Absent (nil) means\nthe task is unestimated; the UI must not read that as zero.","type":"integer"},"ownBillableCents":{"description":"Admin-only, and only when the project has cost tracking on.","type":"integer"},"ownCostCents":{"type":"integer"},"ownMinutes":{"type":"integer"},"taskId":{"type":"integer"},"totalBillableCents":{"type":"integer"},"totalCostCents":{"type":"integer"},"totalMinutes":{"type":"integer"}}},"apimodel.TestArea":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"projectId":{"type":"integer"},"updatedAt":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.TestBoardResponse":{"type":"object","properties":{"areas":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TestArea"}},"features":{"type":"array","items":{"$ref":"#/components/schemas/apimodel.TestFeature"}}}},"apimodel.TestFeature":{"type":"object","properties":{"areaId":{"type":"integer"},"assignedTo":{"$ref":"#/components/schemas/apimodel.UserRef"},"assigneeId":{"description":"AssigneeID / AssignedTo are the DERIVED legacy single-assignee fields,\nkept in step with apimodel.TaskListItem — see the note there. The\nTesting UI only ever assigns one person, so in practice these agree with\nAssignees; they are still derived from it, never from the column.\n\nDeprecated: read assignees.","type":"integer"},"assignees":{"description":"Assignees is the test feature's assignee SET (task_assignees — a test\nfeature is a task row like any other). Always present; empty means\nunassigned.","type":"array","items":{"$ref":"#/components/schemas/apimodel.UserRef"}},"checks":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"integer"},"linkedTaskCount":{"type":"integer"},"name":{"type":"string"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"projectId":{"type":"integer"},"taskId":{"type":"integer"},"testStatus":{"$ref":"#/components/schemas/domain.TestFeatureStatus"},"updatedAt":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.TestFeatureForTask":{"type":"object","properties":{"areaId":{"type":"integer"},"areaName":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"projectId":{"type":"integer"},"status":{"$ref":"#/components/schemas/domain.TestFeatureStatus"}}},"apimodel.TimeContributor":{"type":"object","properties":{"email":{"type":"string"},"minutes":{"type":"integer"},"userId":{"type":"integer"}}},"apimodel.TimeEntry":{"type":"object","properties":{"billable":{"type":"boolean"},"billableAmountCents":{"type":"integer"},"billableRateCents":{"description":"Admin-only. Absent entirely for a member.","type":"integer"},"billableRateSource":{"$ref":"#/components/schemas/domain.RateSource"},"costAmountCents":{"type":"integer"},"costRateCents":{"type":"integer"},"costRateSource":{"$ref":"#/components/schemas/domain.RateSource"},"currency":{"type":"string"},"durationMinutes":{"type":"integer"},"endedAt":{"type":"string"},"entrySource":{"$ref":"#/components/schemas/domain.TimeEntrySource"},"id":{"type":"integer"},"locked":{"type":"boolean"},"notes":{"type":"string"},"projectId":{"type":"integer"},"startedAt":{"type":"string"},"taskId":{"type":"integer"},"taskUuid":{"type":"string"},"userEmail":{"type":"string"},"userId":{"type":"integer"},"uuid":{"type":"string"}}},"apimodel.TopicResponse":{"type":"object","properties":{"channelId":{"type":"integer"},"channelUuid":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"integer"},"lastMessageAt":{"type":"string"},"lastMessageSeq":{"description":"LastMessageSeq is the lane's head pointer — the per-channel seq of the\nnewest message tagged with this topic. Compared against LastReadSeq to\ndecide the badge.","type":"integer"},"lastReadSeq":{"type":"integer"},"muted":{"description":"Muted is the caller's own attention state for this lane, invisible to\neveryone else. It is the MAIN attention control in the product: muting\nsuppresses the badge and nothing else — a muted lane still receives\nmessages and still shows them in All.\n\nOne thing it cannot suppress: a task mention. @BUG-241 notifies the task's\nassignee regardless of topic or mute.","type":"boolean"},"mutedAt":{"type":"string"},"name":{"type":"string"},"orgId":{"type":"integer"},"position":{"description":"Position is the explicit, human-set tab order. Exposed because the client\nrenders the bar in this order and a drag-to-reorder has to send it back.","type":"integer"},"unread":{"type":"boolean"},"updatedAt":{"type":"string"},"uuid":{"type":"string"}}},"apimodel.UnlinkedResult":{"type":"object","properties":{"unlinked":{"type":"boolean"}}},"apimodel.UnreadCountResponse":{"type":"object","properties":{"count":{"type":"integer","example":4}}},"apimodel.UsageResponse":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"projectLimit":{"type":"integer","example":3},"projectsUsed":{"type":"integer","example":3},"seatLimit":{"type":"integer","example":3},"seatsPending":{"description":"SeatsPending counts invites not yet accepted, revoked or expired. They\nhold a seat: the invite check refuses when seatsUsed + seatsPending\nreaches seatLimit.","type":"integer","example":1},"seatsUsed":{"type":"integer","example":2},"storageBytes":{"description":"Bytes exceed 32 bits on a paid plan (10 GB), so the contract says int64\nand the generated native clients decode them as 64-bit.","type":"integer","format":"int64","example":130023424},"storageQuotaBytes":{"type":"integer","format":"int64","example":1073741824},"trialAvailable":{"description":"TrialAvailable is true when POST /billing/trial would start a trial now.","type":"boolean","example":true},"trialBlockedBy":{"description":"TrialBlockedBy is why this caller cannot start the trial when the cause\nis their own email address: \"email_not_verified\" or \"identity_claimed\".\nOmitted when the trial is open to them or closed by the org's own state.","type":"string","example":"email_not_verified"},"trialDays":{"type":"integer","example":14},"trialEndsAt":{"description":"TrialEndsAt and TrialRevertsTo are present only while a trial holds the\norg's plan.","type":"string","example":"2026-11-27T09:00:00Z"},"trialPlan":{"description":"TrialPlan and TrialDays are what the self-serve trial grants.","type":"string","example":"starter"},"trialRevertsTo":{"type":"string","example":"free"}}},"apimodel.UserAvatarItem":{"type":"object","properties":{"avatarUrl":{"type":"string"},"email":{"type":"string","example":"dev@bugboard.eu"},"userId":{"type":"integer","example":1}}},"apimodel.UserPreferencesResponse":{"type":"object","properties":{"aiImproveStrength":{"description":"AIImproveStrength is how far the AI writing assists may depart from\nwhat the author typed: \"slight\", \"balanced\" or \"strong\".","type":"string","example":"balanced"},"aiOutputLanguage":{"description":"AIOutputLanguage is the language the AI writing assists answer in:\n\"author\" (the author's own language — the default) or \"english\".","type":"string","example":"author"},"push":{"description":"Push is the mobile push policy, also resolved.","allOf":[{"$ref":"#/components/schemas/apimodel.PushPreferencesResponse"}]}}},"apimodel.UserRef":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"integer"},"uuid":{"type":"string"}}},"apimodel.UserTimeBreakdown":{"type":"object","properties":{"billableCents":{"type":"integer"},"billableMinutes":{"type":"integer"},"costCents":{"type":"integer"},"email":{"type":"string"},"minutes":{"type":"integer"},"taskCount":{"type":"integer"},"userId":{"type":"integer"}}},"apimodel.VerifyCodeRequest":{"type":"object","properties":{"code":{"type":"string","example":"123456"},"email":{"type":"string","example":"dev@bugboard.eu"}}},"apimodel.VerifyEmailRequest":{"type":"object","properties":{"code":{"type":"string","example":"123456"}}},"apimodel.WebhookCreatedResponse":{"type":"object","properties":{"active":{"type":"boolean","example":true},"events":{"type":"array","items":{"type":"string"}},"id":{"type":"integer","example":1},"projectId":{"type":"integer"},"secret":{"type":"string","example":"whsec_..."},"url":{"type":"string","example":"https://example.com/hook"}}},"domain.Action":{"type":"string","enum":["project.read","project.write","project.manage","org.manage","org.roster.view","chat.read","chat.write","chat.manage"],"x-enum-varnames":["ActionProjectRead","ActionProjectWrite","ActionProjectManage","ActionOrgManage","ActionOrgViewRoster","ActionChatRead","ActionChatWrite","ActionChatManage"]},"domain.Agent":{"type":"object","properties":{"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"createdById":{"type":"integer"},"enabled":{"description":"Enabled deliberately carries NO GORM `default:` tag. GORM omits a\nzero-valued field from the INSERT when the field declares a default, so\n`false` would be written as the column default `true` — the exact inverse\nof what the caller asked for. This is the same trap ChannelMember's\ncapability flags document; every write path sets it explicitly.","type":"boolean"},"handle":{"type":"string"},"id":{"type":"integer"},"instructions":{"description":"Instructions is the HUMAN-AUTHORED persona prompt. No run writes here —\nwhat the agent learns lives in AgentMemory at MemoryScopePersona, which is\nbudgeted and logged separately.","type":"string"},"invocationScope":{"$ref":"#/components/schemas/domain.AgentInvocationScope"},"name":{"type":"string"},"orgId":{"type":"integer"},"policyProfile":{"$ref":"#/components/schemas/domain.AgentPolicyProfile"},"projectScope":{"$ref":"#/components/schemas/domain.AgentProjectScope"},"updatedAt":{"type":"string"},"userId":{"description":"UserID is the actor. One persona per actor (ux_agents_user).","type":"integer"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.AgentConsentRequest":{"type":"object","properties":{"channelId":{"type":"integer"},"createdAt":{"type":"string"},"decidedAt":{"type":"string"},"decidedById":{"type":"integer"},"disclosesChannel":{"description":"DisclosesChannel is a separate boolean rather than something implied by\nthe scope because \"run this on my machine\" and \"and read what was said in\na private channel I am not in\" are two different questions, and only one\nof them can be answered with a shrug.\n\nNo GORM `default:` tag, for the reason Agent.Enabled has none.","type":"boolean"},"executorUserId":{"description":"ExecutorUserID is the approver, and always the owner of the device the\nwork would run on.","type":"integer"},"expiresAt":{"type":"string"},"id":{"type":"integer"},"orgId":{"type":"integer"},"repoKey":{"type":"string"},"requesterUserId":{"type":"integer"},"runId":{"description":"RunID is PROVENANCE ONLY: the run that first had to ask. It is nullable\nand ON DELETE SET NULL because an approved project- or repo-scoped grant\nOUTLIVES the run that prompted it — cascading it away would silently\nrevoke a standing consent whenever retention swept an old transcript.","type":"integer"},"scope":{"$ref":"#/components/schemas/domain.ConsentScope"},"status":{"$ref":"#/components/schemas/domain.ConsentStatus"},"updatedAt":{"type":"string"},"uuid":{"type":"string"}}},"domain.AgentDevice":{"type":"object","properties":{"capabilityDigest":{"description":"CapabilityDigest is the sha256 of the daemon's capability snapshot. The\nDIGEST ONLY: the router needs \"has this machine changed since we last\nlooked\", not an inventory of what is installed on an employee's laptop.","type":"string"},"createdAt":{"type":"string"},"id":{"type":"integer"},"label":{"type":"string"},"lastSeenAt":{"type":"string"},"maxConcurrent":{"description":"MaxConcurrent carries no GORM `default:` tag for the reason Agent.Enabled\ndoes not — a caller asking for a value GORM considers zero must not have\nthe column default substituted. ck_agent_devices_max_concurrent bounds it\nto 1..16, so 0 is rejected loudly rather than silently becoming 1.","type":"integer"},"orgId":{"type":"integer"},"ownerUserId":{"description":"OwnerUserID is the member whose machine this is. This user becomes the\nEXECUTOR of every run routed here, and is the ONLY person who may approve\na consent request against it (ck_agent_consent_decider).","type":"integer"},"platform":{"type":"string"},"revokedAt":{"type":"string"},"scopes":{"description":"Scopes round-trips through the jsonb column via `serializer:json`, the\nsame mechanism SavedFilter.Config uses. ck_agent_devices_scopes enforces\nnon-empty and closed; ValidateDeviceScopes is the Go-side pre-check.","type":"array","items":{"$ref":"#/components/schemas/domain.DeviceScope"}},"secretPrefix":{"description":"SecretPrefix is the visible fragment, for identifying the device in a\nlist without revealing the credential.","type":"string"},"updatedAt":{"type":"string"},"uuid":{"type":"string"}}},"domain.AgentInvocationScope":{"type":"string","enum":["anyone","owner"],"x-enum-varnames":["AgentInvocationAnyone","AgentInvocationOwner"]},"domain.AgentPolicyProfile":{"type":"string","enum":["read_only","guarded","autonomous"],"x-enum-varnames":["AgentPolicyReadOnly","AgentPolicyGuarded","AgentPolicyAutonomous"]},"domain.AgentProjectScope":{"type":"string","enum":["all","selected"],"x-enum-varnames":["AgentProjectScopeAll","AgentProjectScopeSelected"]},"domain.AgentRunEvent":{"type":"object","properties":{"createdAt":{"type":"string"},"kind":{"$ref":"#/components/schemas/domain.AgentRunEventKind"},"orgId":{"type":"integer"},"payload":{"$ref":"#/components/schemas/domain.JSONMap"},"runId":{"type":"integer"},"seq":{"type":"integer"},"uuid":{"type":"string"}}},"domain.AgentRunEventKind":{"type":"string","enum":["queued","routed","consent_requested","consent_granted","consent_denied","dispatched","claimed","model_turn","tool_call","tool_result","file_changed","message_posted","memory_written","lease_expired","error","finished"],"x-enum-varnames":["AgentRunEventQueued","AgentRunEventRouted","AgentRunEventConsentRequested","AgentRunEventConsentGranted","AgentRunEventConsentDenied","AgentRunEventDispatched","AgentRunEventClaimed","AgentRunEventModelTurn","AgentRunEventToolCall","AgentRunEventToolResult","AgentRunEventFileChanged","AgentRunEventMessagePosted","AgentRunEventMemoryWritten","AgentRunEventLeaseExpired","AgentRunEventError","AgentRunEventFinished"]},"domain.BillingItemKind":{"type":"string","enum":["milestone","one_off","task_fixed"],"x-enum-varnames":["BillingItemMilestone","BillingItemOneOff","BillingItemTaskFixed"]},"domain.BillingItemStatus":{"type":"string","enum":["planned","delivered","invoiced"],"x-enum-varnames":["BillingItemPlanned","BillingItemDelivered","BillingItemInvoiced"]},"domain.BugRepoWithRepo":{"type":"object","properties":{"bugId":{"type":"integer"},"createdAt":{"type":"string"},"headBranch":{"type":"string"},"prNumber":{"type":"integer"},"prStatus":{"type":"string"},"prUrl":{"type":"string"},"repository":{"$ref":"#/components/schemas/domain.Repository"},"repositoryId":{"type":"integer"},"targetBranch":{"type":"string"}}},"domain.BugStats":{"type":"object","properties":{"done":{"type":"integer"},"inProgress":{"type":"integer"},"pending":{"type":"integer"},"review":{"type":"integer"},"total":{"type":"integer"}}},"domain.CanvasCard":{"type":"object","properties":{"assignee":{"description":"Assignee is loaded on reads for the assignee avatar/email.","allOf":[{"$ref":"#/components/schemas/domain.User"}]},"assigneeEmail":{"description":"AssigneeEmail is the same convenience for the assignee.","type":"string"},"assigneeId":{"description":"AssigneeID is the user responsible for the card (an idea's owner),\nif assigned. Nil = unassigned.","type":"integer"},"author":{"description":"Author is loaded by the repository so the UI can show the creator's\nemail/avatar without a second lookup.","allOf":[{"$ref":"#/components/schemas/domain.User"}]},"authorEmail":{"description":"AuthorEmail is a computed convenience populated by the service on\nreads so the board can render an avatar without embedding the full\nuser object in every card.","type":"string"},"authorId":{"description":"AuthorID is the user who created the card (nil for agent-created\ncards without a resolvable user). Votes is a simple upvote tally.","type":"integer"},"body":{"type":"string"},"color":{"description":"Color is a semantic token name (amber, blue, green…) or empty for\nthe kind's default. Text is the title / sticky body; Body is the\noptional markdown description shown under the title on idea cards.","type":"string"},"commentCount":{"description":"CommentCount is populated by the service on board reads so a card\ncan show a discussion badge without loading its thread.","type":"integer"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"h":{"type":"number"},"html":{"description":"HTML is the self-contained artifact for widget cards. Rendered in a\nsandboxed iframe on the frontend; never executed server-side.","type":"string"},"id":{"type":"integer"},"kind":{"$ref":"#/components/schemas/domain.CanvasCardKind"},"linkedTaskCount":{"description":"LinkedTaskCount / PeopleCount are populated on board reads so a card\ncan show badges without loading the full lists.","type":"integer"},"linkedTaskId":{"description":"LinkedTaskID is set once the card has been promoted to a task; the\ncard then renders as a task_ref chip that deep-links to the task.\n(A card can additionally reference *other* tasks via CanvasCardTask.)","type":"integer"},"peopleCount":{"type":"integer"},"projectId":{"type":"integer"},"tags":{"description":"Tags is the set of project labels applied to this card. Reuses the\nsame Tag entity as tasks, via the canvas_card_tags junction.","type":"array","items":{"$ref":"#/components/schemas/domain.Tag"}},"text":{"type":"string"},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"},"votes":{"type":"integer"},"w":{"type":"number"},"x":{"description":"X / Y are the card's top-left in board space. W / H are its size\n(0 = let the frontend use the kind's default). Z orders stacking.","type":"number"},"y":{"type":"number"},"z":{"type":"integer"}}},"domain.CanvasCardKind":{"type":"string","enum":["sticky","idea","widget","prompt","task_ref","frame","note"],"x-enum-varnames":["CardSticky","CardIdea","CardWidget","CardPrompt","CardTaskRef","CardFrame","CardNote"]},"domain.CanvasComment":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/domain.User"},"authorEmail":{"type":"string"},"authorId":{"type":"integer"},"body":{"type":"string"},"cardId":{"type":"integer"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"id":{"type":"integer"},"images":{"description":"Images are pasted/dropped screenshots, stored as client-resized\n`data:` URLs (webp) — same lightweight pattern as project avatars,\nso no file storage / signed-URL plumbing. JSON-serialized.","type":"array","items":{"type":"string"}},"projectId":{"type":"integer"},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.CanvasEdge":{"type":"object","properties":{"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"fromCardId":{"type":"integer"},"id":{"type":"integer"},"label":{"description":"Label is an optional short caption rendered at the midpoint.","type":"string"},"projectId":{"type":"integer"},"toCardId":{"type":"integer"},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.ColumnWithCount":{"type":"object","properties":{"color":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"},"taskCount":{"type":"integer"},"type":{"description":"Type is the RESOLVED type: a legacy column with no stored type reads as\nthe type its key implies, so the answer is never empty.","type":"string"}}},"domain.CommentEdit":{"type":"object","properties":{"bodyBefore":{"type":"string"},"commentId":{"type":"integer"},"editedAt":{"type":"string"},"editedBy":{"type":"integer"},"id":{"type":"integer"}}},"domain.CommentWithUser":{"type":"object","properties":{"bugId":{"type":"integer"},"bugUuid":{"description":"BugUUID, FeatureUUID, UserUUID mirror their *_id siblings via\nPhase E.2.1's migration #14 backfill. New writes still go\nthrough the legacy *_id columns (set by service code that\npre-dates the UUID work); the *_uuid columns auto-populate\nfrom the FK target's uuid in the migration and via a\nBeforeSave hook on Comment that looks up the UUID when\nwriting a new comment with only BugID/FeatureID set.","type":"string"},"content":{"description":"Stored as TEXT (unbounded) so long-form comments — full stack traces,\nrqlite diff dumps, multi-paragraph postmortems — aren't truncated.\nSQLite ignores VARCHAR length anyway; making the type explicit keeps\nfuture Postgres migrations from re-introducing a hidden ceiling.","type":"string"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"featureId":{"type":"integer"},"featureUuid":{"type":"string"},"id":{"type":"integer"},"orgId":{"description":"OrgID denormalizes the owning org so the inbox / fan-out / audit\npaths can scope by org without joining through task→project. Resolved\nin BeforeCreate from whichever parent is set (task or project).","type":"integer"},"projectId":{"description":"ProjectID is set for project-level (\"# General\") chat messages —\ncomments attached to a project rather than a specific task. When\nset, BugID/FeatureID are nil. Drives the messenger's per-project\ngroup chat.","type":"integer"},"updatedAt":{"type":"string"},"user":{"$ref":"#/components/schemas/domain.User"},"userEmail":{"type":"string"},"userId":{"type":"integer"},"userUuid":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.ConsentScope":{"type":"string","enum":["once","project","repo"],"x-enum-varnames":["ConsentScopeOnce","ConsentScopeProject","ConsentScopeRepo"]},"domain.ConsentStatus":{"type":"string","enum":["pending","approved","denied","expired","revoked"],"x-enum-varnames":["ConsentPending","ConsentApproved","ConsentDenied","ConsentExpired","ConsentRevoked"]},"domain.DMParticipant":{"type":"object","properties":{"userId":{"type":"integer"},"uuid":{"type":"string"}}},"domain.DeletionBlocker":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/domain.DeletionBlockerCode"},"message":{"type":"string"},"orgId":{"type":"integer"},"orgName":{"type":"string"}}},"domain.DeletionBlockerCode":{"type":"string","enum":["SOLE_OWNER_WITH_MEMBERS","ORG_HAS_ACCOUNTING_RECORDS"],"x-enum-varnames":["BlockerSoleOwnerWithMembers","BlockerOrgHasAccountingRecords"]},"domain.DeviceScope":{"type":"string","enum":["read_repo","write_repo","run_tests","run_shell","network"],"x-enum-varnames":["DeviceScopeReadRepo","DeviceScopeWriteRepo","DeviceScopeRunTests","DeviceScopeRunShell","DeviceScopeNetwork"]},"domain.FeatureStats":{"type":"object","properties":{"done":{"type":"integer"},"inProgress":{"type":"integer"},"pending":{"type":"integer"},"review":{"type":"integer"},"total":{"type":"integer"}}},"domain.FieldTarget":{"type":"string","enum":["native","tag","description","skip"],"x-enum-varnames":["FieldTargetNative","FieldTargetTag","FieldTargetDescription","FieldTargetSkip"]},"domain.ImportFieldMapping":{"type":"object","properties":{"externalId":{"type":"string"},"nativeField":{"description":"NativeField names the destination when Target is native: \"priority\",\n\"status\", \"storyPoints\", \"dueDate\", \"startDate\", \"estimatedMinutes\".","type":"string"},"target":{"$ref":"#/components/schemas/domain.FieldTarget"},"valueMap":{"description":"ValueMap translates source option ids to native values, for enumerated\nfields going somewhere native (\"opt-1\" -> \"high\").","type":"object","additionalProperties":{"type":"string"}}}},"domain.ImportOptions":{"type":"object","properties":{"checklistsAsSubtasks":{"description":"ChecklistsAsSubtasks promotes checklist items to real sub-tasks instead\nof rendering them as markdown checkboxes in the description. Off by\ndefault: a Trello checklist item is not a task -- it has no comments and\nno attachments -- so promoting them inflates task counts for no gain.","type":"boolean"},"createColumns":{"description":"CreateColumns are columns the wizard wants created on the target\nproject, keyed by scope external id.","type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/domain.ProjectColumn"}}},"fieldMappings":{"type":"array","items":{"$ref":"#/components/schemas/domain.ImportFieldMapping"}},"importArchived":{"description":"ImportArchived brings archived tasks over, marked resolved.","type":"boolean"},"importAttachments":{"description":"ImportAttachments downloads and re-hosts source attachments. Separable\nbecause attachments dominate both wall-clock time and storage quota.","type":"boolean"},"personMappings":{"type":"array","items":{"$ref":"#/components/schemas/domain.ImportPersonMapping"}},"scopeNames":{"description":"ScopeNames overrides the target project name per scope.","type":"object","additionalProperties":{"type":"string"}},"scopes":{"description":"Scopes selected for import, by external id.","type":"array","items":{"type":"string"}},"skipClosedBefore":{"description":"SkipClosedBefore drops resolved tasks last touched before this instant.\nA five-year-old workspace is mostly closed tasks, and since runtime is\ndominated by the source's rate limit this is the biggest lever the\noperator has over how long the import takes.","type":"string"},"statusMappings":{"type":"array","items":{"$ref":"#/components/schemas/domain.ImportStatusMapping"}}}},"domain.ImportPersonMapping":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/domain.PersonAction"},"email":{"type":"string"},"externalId":{"type":"string"},"userId":{"type":"integer"}}},"domain.ImportStatusMapping":{"type":"object","properties":{"columnKey":{"description":"ColumnKey is an existing column key, or the key of a column listed in\nImportOptions.CreateColumns.","type":"string"},"scopeId":{"type":"string"},"source":{"type":"string"}}},"domain.InitiativeStatus":{"type":"string","enum":["planned","active","at_risk","shipped","cancelled"],"x-enum-varnames":["InitiativeStatusPlanned","InitiativeStatusActive","InitiativeStatusAtRisk","InitiativeStatusShipped","InitiativeStatusCancelled"]},"domain.JSONMap":{"type":"object","additionalProperties":{}},"domain.JobKind":{"type":"string","enum":["triage","plan","implement","pr_merge","pr_followup","index","reconcile_github","poll_remote","bug_chat","detect_duplicate","backfill_duplicates","webhook_deliver","import","data_retention","agent_turn","push_deliver","activation_emails"],"x-enum-comments":{"JobKindImplement":"phase 9","JobKindIndex":"phase 5/6","JobKindPRFollowup":"phase 10b — review-comment driven follow-up commit","JobKindPRMerge":"phase 10 — auto-merge after approval","JobKindPlan":"phase 8","JobKindPollRemote":"phase 4","JobKindReconcileGitHub":"phase 10","JobKindTriage":"phase 7"},"x-enum-descriptions":["phase 7","phase 8","phase 9","phase 10 — auto-merge after approval","phase 10b — review-comment driven follow-up commit","phase 5/6","phase 10","phase 4","","","","","","","","",""],"x-enum-varnames":["JobKindTriage","JobKindPlan","JobKindImplement","JobKindPRMerge","JobKindPRFollowup","JobKindIndex","JobKindReconcileGitHub","JobKindPollRemote","JobKindBugChat","JobKindDetectDuplicate","JobKindBackfillDuplicates","JobKindWebhookDeliver","JobKindImport","JobKindDataRetention","JobKindAgentTurn","JobKindPushDeliver","JobKindActivationEmails"]},"domain.JobStatus":{"type":"string","enum":["pending","running","done","failed","canceled"],"x-enum-varnames":["JobPending","JobRunning","JobDone","JobFailed","JobCanceled"]},"domain.LinkedTaskRef":{"type":"object","properties":{"id":{"type":"integer"},"projectId":{"type":"integer"},"status":{"description":"A project COLUMN KEY, not a member of the domain.Status const set —\ncolumns are user-configurable. See apimodel.TaskListItem.Status.","type":"string"},"taskId":{"type":"integer"},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/domain.TaskType"}}},"domain.LogAction":{"type":"string","enum":["create","update","delete"],"x-enum-varnames":["LogActionCreate","LogActionUpdate","LogActionDelete"]},"domain.LogEntityType":{"type":"string","enum":["project","bug","feature","comment","test_feature","canvas_card","message"],"x-enum-varnames":["LogEntityProject","LogEntityBug","LogEntityFeature","LogEntityComment","LogEntityTestFeature","LogEntityCanvasCard","LogEntityMessage"]},"domain.LogWithUser":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/domain.LogAction"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"details":{"type":"string"},"entityId":{"type":"integer"},"entityNumber":{"description":"EntityNumber is the per-project, human-facing number of the entity\n(tasks.task_id — the \"3\" in bug-3), snapshotted at write time.\n\nEntityID above is the GLOBAL tasks.id, which no URL in the product\naccepts: task routes address a task as\n/projects/:projectId/:segment/:taskNumber. Without this column the\nactivity feed cannot build a working deep link for anything but a\nproject, so every bug/feature row fell back to a generic /projects\nlink. Storing the number (rather than joining `tasks` on read) keeps\nthe feed a self-contained audit record: one index scan per page with\nno fan-out, and delete rows stay linkable after the task is gone.\n\nNil for entities that have no per-project number (projects, org-level\nrows) and for pre-CHG-197 rows whose task has since been hard-deleted.","type":"integer"},"entityType":{"$ref":"#/components/schemas/domain.LogEntityType"},"id":{"type":"integer"},"orgId":{"type":"integer"},"projectId":{"description":"ProjectID is the project this activity belongs to, when one can\nbe resolved. Nullable for org-wide rows (org settings, member\nmanagement). Indexed because the per-day activity stats endpoint\nfilters by project_id.","type":"integer"},"updatedAt":{"type":"string"},"user":{"description":"Relations","allOf":[{"$ref":"#/components/schemas/domain.User"}]},"userEmail":{"type":"string"},"userId":{"type":"integer"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.MCPCallLog":{"type":"object","properties":{"argsJson":{"description":"ArgsJSON is stored as jsonb so audit queries can filter/extract\nindividual tool arguments. Writers always send a valid JSON value\n(defaulting to \"{}\").","type":"string"},"createdAt":{"type":"string"},"durationMs":{"type":"integer"},"errorCode":{"type":"integer"},"id":{"type":"integer"},"orgId":{"type":"integer"},"success":{"type":"boolean"},"tokenId":{"type":"integer"},"tool":{"type":"string"},"userId":{"type":"integer"}}},"domain.NotificationType":{"type":"string","enum":["mention","assigned","unassigned","status_change","comment","sub_issue_created","task_created"],"x-enum-varnames":["NotificationMention","NotificationAssigned","NotificationUnassigned","NotificationStatusChange","NotificationComment","NotificationSubIssueCreated","NotificationTaskCreated"]},"domain.NotificationWithActor":{"type":"object","properties":{"actorEmail":{"type":"string"},"actorId":{"type":"integer"},"body":{"type":"string"},"commentId":{"description":"CommentID anchors a comment-driven notification (mention / comment\nfan-out) at the exact comment, so a push tap can scroll to the reply\ninstead of dumping the reader at the top of the thread. It is an\nADDITIONAL anchor: EntityType/EntityID still address the task, which\nis what every existing reader keys on.\n\nNil for every non-comment type, and for rows written before migration\n0040. It is deliberately absent from GroupKey — see that field.","type":"integer"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"entityDeleted":{"type":"boolean"},"entityId":{"type":"integer"},"entityType":{"$ref":"#/components/schemas/domain.LogEntityType"},"id":{"type":"integer"},"isSubscribed":{"description":"IsSubscribed reports whether the recipient currently watches the\ntask this notification points at, so the inbox can render a\nper-row subscribe/unsubscribe toggle without a follow-up fetch. It\nis computed at read time via a single batched lookup against\ntask_subscribers keyed on EntityID, and is meaningful only for\ntask-pointing rows (EntityType in bug/feature/comment). For\nproject or other entity types it stays false.","type":"boolean"},"orgId":{"type":"integer"},"projectId":{"type":"integer"},"readAt":{"type":"string"},"taskNumber":{"type":"integer"},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/domain.NotificationType"},"updatedAt":{"type":"string"},"userId":{"type":"integer"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.OrgRole":{"type":"string","enum":["owner","admin","member","guest"],"x-enum-varnames":["RoleOwner","RoleAdmin","RoleMember","RoleGuest"]},"domain.OutboundWebhook":{"type":"object","properties":{"active":{"type":"boolean"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"events":{"description":"Events is the set of event names this endpoint subscribes to,\ne.g. [\"task.created\",\"task.updated\",\"task.status_changed\"]. An\nempty set means \"all events\".","type":"array","items":{"type":"string"}},"id":{"type":"integer"},"lastError":{"type":"string"},"lastStatus":{"description":"LastStatus / LastError record the outcome of the most recent\ndelivery attempt for a lightweight health signal in the UI.","type":"integer"},"orgId":{"type":"integer"},"projectId":{"type":"integer"},"updatedAt":{"type":"string"},"url":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.PersonAction":{"type":"string","enum":["match","invite","skip"],"x-enum-varnames":["PersonActionMatch","PersonActionInvite","PersonActionSkip"]},"domain.Plan":{"type":"string","enum":["free","starter","business"],"x-enum-comments":{"PlanBusiness":"$179/mo · up to 20 seats","PlanStarter":"$19/mo · up to 5 seats"},"x-enum-descriptions":["","$19/mo · up to 5 seats","$179/mo · up to 20 seats"],"x-enum-varnames":["PlanFree","PlanStarter","PlanBusiness"]},"domain.PlanFeature":{"type":"string","enum":["initiatives","sprints","time_tracking","git_providers","webhooks","calendar_feed","email_to_issue","audit_log"],"x-enum-varnames":["FeatureInitiatives","FeatureSprints","FeatureTimeTracking","FeatureGitProviders","FeatureWebhooks","FeatureCalendarFeed","FeatureEmailToIssue","FeatureAuditLog"]},"domain.PlanTier":{"type":"object","properties":{"aiRequests":{"description":"AIRequests is the included monthly AI-request allowance.","type":"integer"},"contactSales":{"description":"ContactSales means not self-serve Stripe checkout — CTA is /contact.","type":"boolean"},"entitlements":{"description":"Entitlements is the machine-readable form of the gated bullets, so a\nclient can grey out a control without string-matching marketing copy.","type":"array","items":{"$ref":"#/components/schemas/domain.PlanFeature"}},"features":{"description":"Features are the display bullets. The gated ones are GENERATED from\nentitlements.go (see planBullets) rather than typed here — a bullet\nthat names a capability is therefore a capability the middleware\nactually enforces. Only unenforceable copy (\"Priority support\") is\nhand-written, in Extras.","type":"array","items":{"type":"string"}},"highlighted":{"type":"boolean"},"id":{"description":"\"free\" / \"starter\" / \"business\" / \"enterprise-s|m|l\"","type":"string"},"name":{"description":"display name","type":"string"},"priceMonthlyEur":{"description":"PriceMonthlyEUR is euros at the request's USD→EUR rate (may include\ncents, e.g. 16.47). Filled by PlanTiersAtEURRate.","type":"number"},"priceMonthlyUsd":{"type":"integer"},"priceYearlyEur":{"type":"number"},"priceYearlyUsd":{"description":"PriceYearlyUSD is set for annual prepaid packages (Enterprise). When\nnon-zero the UI shows yearly as the primary price.","type":"integer"},"projectLimit":{"description":"ProjectLimit is the number of projects the org may create. -1 = unlimited.","type":"integer"},"seats":{"description":"included seat cap (-1 = unlimited)","type":"integer"},"storageGb":{"description":"StorageGB is the attachment allowance in whole gigabytes.","type":"integer"},"trialDays":{"description":"TrialDays is the length of the self-serve trial this tier can start\nwith no card (POST /billing/trial); 0 for a tier with none. Set by the\nplans handler from the trial service, so sign-up can say \"free for 14\ndays\" without its own copy of the number.","type":"integer"}}},"domain.PresenceStatus":{"type":"string","enum":["offline","active","away","dnd"],"x-enum-varnames":["PresenceOffline","PresenceActive","PresenceAway","PresenceDND"]},"domain.PresenceView":{"type":"object","properties":{"lastSeenAt":{"type":"string"},"status":{"$ref":"#/components/schemas/domain.PresenceStatus"},"userUuid":{"type":"string"}}},"domain.Priority":{"type":"string","enum":["low","medium","high"],"x-enum-varnames":["PriorityLow","PriorityMedium","PriorityHigh"]},"domain.ProjectColumn":{"type":"object","properties":{"color":{"description":"hex color, optional","type":"string"},"key":{"description":"unique slug, auto-derived from Label","type":"string"},"label":{"description":"display name, e.g. \"Stuck\", \"To Do\"","type":"string"},"position":{"description":"sort order","type":"integer"},"type":{"description":"Semantic meaning; drives icon + resolved-ness. Serialised as a plain\nstring because it is legitimately EMPTY on column blobs written before\nType existed — project 22 sends \"\" for three of its four columns. As a\nclosed enum in the spec this crashed the generated clients on every\nboard and task-detail load.","type":"string"}}},"domain.ProjectColumnSet":{"type":"object","properties":{"columns":{"description":"Columns are in board order (Position, ties in stored order).","type":"array","items":{"$ref":"#/components/schemas/domain.ColumnWithCount"}},"landingColumn":{"description":"LandingColumn is the configured landing key, \"\" when none is configured\nor the stored key is no longer a column.","type":"string"},"moved":{"description":"Moved is, on a write, how many tasks moved per removed column key.","type":"object","additionalProperties":{"type":"integer","format":"int64"}},"newTaskColumn":{"description":"NewTaskColumn is the key a task created without a status lands in right\nnow (DefaultNewTaskStatus): the answer to \"where do new tasks go\".","type":"string"},"projectId":{"type":"integer"},"unplacedTaskCounts":{"description":"UnplacedTaskCounts holds the live tasks whose status matches no column,\nper status. Empty on a healthy board.","type":"object","additionalProperties":{"type":"integer","format":"int64"}}}},"domain.ProjectFeatures":{"type":"object","properties":{"ai":{"description":"AI gates the project's AI-assisted features (canvas widget generation,\nidea expansion/suggestion, and any other per-project AI helper), which\nsend card/task text to the LLM provider — see docs/SECURITY.md §5.\n\nThis is the ONE toggle in this struct that is opt-OUT rather than\nopt-in, which is why it is a *bool instead of a bool. It has to\ndistinguish three states, not two:\n\n  nil   — never configured (every project predating this field, and\n          every project created without an explicit choice) → ENABLED\n  true  — explicitly enabled                                → ENABLED\n  false — explicitly disabled by the org                    → DISABLED\n\nA plain bool cannot express that: its zero value is false, so shipping\none would silently switch off working AI features for every existing\nproject on deploy. Encoding \"unset\" as nil gets the opt-out behaviour\nwith no backfill migration — nothing has to rewrite every project's\nfeatures JSON, so there is no migration that can half-apply.\n\nThis narrows the ORG switch (organizations.ai_enabled, enforced by\nllm.WithOrgGate on every model call); it can never widen it. An org that\nhas switched AI off blocks every project, whatever this says.\n\nAlways read this through AIEnabled(); do not dereference it directly.","type":"boolean"},"brainstorm":{"description":"Brainstorm enables the freeform brainstorming canvas — a\nmultiplayer, Miro-style board of sticky/idea/widget cards that can\nbe promoted into tasks. Distinct from the kanban board.","type":"boolean"},"calendar":{"description":"Calendar enables the calendar/scheduling view on the project.","type":"boolean"},"costTracking":{"description":"CostTracking layers money on top of TimeTracking: billable/cost rates,\nbilling items, and the margin columns of the project Time view. It is a\nSUB-TOGGLE — meaningless without TimeTracking, and the settings UI\nnests it accordingly, so a team that only wants hours never sees a\ncurrency symbol.\n\nThe rate itself no longer lives here. It moved to the `billing_rates`\ntable in migration 0009, which resolves per project, per person, per\nproject-member and per task instead of one number per project.","type":"boolean"},"duplicateDetection":{"description":"DuplicateDetection enables async similar/duplicate task detection: on\ncreate, a task is embedded and compared against the project's others,\nsurfacing a \"possible duplicate\" badge + suggestions. Off by default\nbecause it sends task text to the embeddings provider (OpenRouter).","type":"boolean"},"maxColumnsOnView":{"description":"MaxColumnsOnView caps how many kanban columns render at full\nwidth before the board switches to fixed-width columns + a\nhorizontal scroll (M3). 0 = auto (fit up to 6). Prevents the\n\"10 columns squeezed paper-thin\" problem on wide boards.","type":"integer"},"sprints":{"description":"Sprints enables time-boxed iteration grouping (this/next/backlog).","type":"boolean"},"storyPoints":{"description":"StoryPoints enables an estimation field + per-column point sums.","type":"boolean"},"testing":{"description":"Testing enables the manual test-coverage view — a tree of feature\nareas a person marks pass/fail to track what's actually been\ntested before a release (distinct from automated tests).","type":"boolean"},"timeTracking":{"description":"TimeTracking enables the timer, manual entry, the week grid, and the\nproject Time view. Hours work the moment it is on — no rate, no\ncurrency, no billing configuration required (CHG-177).","type":"boolean"}}},"domain.ProjectRole":{"type":"string","enum":["admin","member","viewer"],"x-enum-varnames":["ProjectRoleAdmin","ProjectRoleMember","ProjectRoleViewer"]},"domain.ProjectSubscriptionLevel":{"type":"string","enum":["all","participating","ignore"],"x-enum-varnames":["ProjectSubAll","ProjectSubParticipating","ProjectSubIgnore"]},"domain.ProjectTemplate":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/domain.ProjectColumn"}},"description":{"type":"string"},"features":{"$ref":"#/components/schemas/domain.ProjectFeatures"},"id":{"type":"string"},"name":{"type":"string"}}},"domain.RateKind":{"type":"string","enum":["billable","cost"],"x-enum-varnames":["RateKindBillable","RateKindCost"]},"domain.RateScope":{"type":"string","enum":["org","project","user","project_member","task"],"x-enum-varnames":["RateScopeOrg","RateScopeProject","RateScopeUser","RateScopeProjectMember","RateScopeTask"]},"domain.RateSource":{"type":"string","enum":["org","project","user","project_member","task","manual","unset"],"x-enum-varnames":["RateSourceOrg","RateSourceProject","RateSourceUser","RateSourceProjectMember","RateSourceTask","RateSourceManual","RateSourceUnset"]},"domain.ReactionTally":{"type":"object","properties":{"count":{"type":"integer"},"emoji":{"type":"string"},"firstAt":{"description":"FirstAt orders the pills. Reaction order is \"who got there first\", which\nis stable — ordering by count would make pills swap places under the\ncursor as other people react.","type":"string"},"mine":{"description":"Mine reports whether the requesting principal reacted with this emoji.\n\nComputed in SQL rather than by handing the client the reactor list and\nletting it look for itself. The names are NOT here on purpose: a pill\nrenders a glyph and a number, and a message that collected four hundred\nreactions would otherwise put four hundred uuids into a page read that\nfifty messages share. Who reacted is a separate, bounded read behind the\ntooltip — see ReactionRepository.Reactors.","type":"boolean"}}},"domain.Repository":{"type":"object","properties":{"cloneUrl":{"type":"string"},"commitActivitySyncedAt":{"description":"CommitActivitySyncedAt records the last time the commit-activity\nheatmap cache (repo_commit_days) was refreshed from the GitHub\nstats API for this repo. Nil means never synced. The project\ncommit-activity endpoint triggers a background re-sync when this is\nnil or older than the staleness TTL (~6h).","type":"string"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"credentialId":{"type":"integer"},"defaultBranch":{"type":"string"},"host":{"type":"string"},"id":{"type":"integer"},"indexedBranch":{"type":"string"},"isOrgDefault":{"description":"IsPrimary survived the org-level lift but its meaning shifted:\nwhere it used to mean \"primary repo for THIS project\", it now means\n\"this repo is the org's default suggestion in repo pickers\". The\ncolumn name is kept for migration simplicity; the JSON field is\nrenamed to `isOrgDefault` so frontend reads stay self-explanatory.","type":"boolean"},"lastIndexedAt":{"type":"string"},"lastIndexedSha":{"type":"string"},"lastPushedSha":{"type":"string"},"name":{"type":"string"},"orgId":{"type":"integer"},"owner":{"type":"string"},"provider":{"type":"string"},"providerRepoId":{"type":"integer"},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.SavedFilterScope":{"type":"string","enum":["private","org"],"x-enum-varnames":["SavedFilterScopePrivate","SavedFilterScopeOrg"]},"domain.Severity":{"type":"string","enum":["critical","high","medium","low","info"],"x-enum-varnames":["SeverityCritical","SeverityHigh","SeverityMedium","SeverityLow","SeverityInfo"]},"domain.SimilarTaskRef":{"type":"object","properties":{"id":{"description":"task_similarities.id","type":"integer"},"kind":{"$ref":"#/components/schemas/domain.TaskLinkType"},"score":{"type":"number"},"status":{"$ref":"#/components/schemas/domain.TaskSimilarityStatus"},"task":{"$ref":"#/components/schemas/domain.LinkedTaskRef"}}},"domain.Sprint":{"type":"object","properties":{"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"doneCount":{"type":"integer"},"endDate":{"type":"string"},"endedAt":{"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"projectId":{"type":"integer"},"startDate":{"description":"Planned span shown on the calendar (distinct from the StartedAt /\nEndedAt lifecycle timestamps). StartDate defaults to the day the\nsprint started; EndDate is picked at start and can be dragged on\nthe calendar.","type":"string"},"startedAt":{"type":"string"},"status":{"$ref":"#/components/schemas/domain.SprintStatus"},"taskCount":{"description":"Snapshot taken at end time (0 while active).","type":"integer"},"tasks":{"description":"Tasks is the snapshot of what the sprint carried at end time —\neach task with whether it finished. Lets the history show what got\ndone vs. what was carried over. Empty while active.","type":"array","items":{"$ref":"#/components/schemas/domain.SprintTaskSnapshot"}},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.SprintStatus":{"type":"string","enum":["active","completed"],"x-enum-varnames":["SprintActive","SprintCompleted"]},"domain.SprintTaskSnapshot":{"type":"object","properties":{"done":{"type":"boolean"},"taskId":{"description":"db id (for deep-linking)","type":"integer"},"taskNumber":{"description":"per-project number shown to users","type":"integer"},"title":{"type":"string"},"type":{"description":"bug / feature / change","type":"string"}}},"domain.Substate":{"type":"string","enum":["triaging","awaiting_info","planning","implementing","impl_partial","pr_open","testing","done","blocked"],"x-enum-comments":{"SubstateAwaitingInfo":"agent asked a clarifying question; waiting on user comment","SubstateImplPartial":"multi-repo implementer landed only some PRs; user can resume"},"x-enum-descriptions":["","agent asked a clarifying question; waiting on user comment","","","multi-repo implementer landed only some PRs; user can resume","","","",""],"x-enum-varnames":["SubstateTriaging","SubstateAwaitingInfo","SubstatePlanning","SubstateImplementing","SubstateImplPartial","SubstatePROpen","SubstateTesting","SubstateDone","SubstateBlocked"]},"domain.Tag":{"type":"object","properties":{"color":{"description":"Hex color: #FF5733","type":"string"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"orgId":{"description":"OrgID / ProjectUUID denormalize the owning org + project uuid so the\nPowerSync sync rule can scope tags by org and the client can join\ntags↔projects locally. Populated in BeforeCreate from the parent\nproject, mirroring the Bug/Comment Phase E.2.2 pattern.","type":"integer"},"projectId":{"type":"integer"},"projectUuid":{"type":"string"},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.Task":{"type":"object","properties":{"agentMemory":{"description":"AgentMemory is a short, free-form text block the chat agent maintains\nacross the bug's lifetime. Things like \"user prefers staging for\nverification\", \"the failing test is auth/signup_test.go\", or\n\"previous attempt got stuck on missing env var FOO\". Read by triage\n(and other stages) on subsequent runs so they don't relearn what the\nchat agent already figured out from the comment thread. Capped at a\nfew KB by convention; the chat agent overwrites/edits it via the\nupdate_bug_memory tool. Stored on the bug row rather than as an\nartifact so it's globally readable without needing a run handle.","type":"string"},"areaId":{"description":"AreaID is the test area (Testing-board column) the feature sits in.","type":"integer"},"assignees":{"description":"Assignees is the task's assignee SET, ordered by user id so the order is\nstable across reads (nothing in the model ranks one assignee above\nanother — see the docs: there is no \"primary\" assignee).\n\nNot persisted (gorm:\"-\"), and deliberately NOT a GORM many2many\nassociation over task_assignees. A relation would let Save() and the\nassociation API write the join table as a side effect of an unrelated\ntask update, which is exactly how a \"single source of truth\" quietly\nstops being one. Every write goes through TaskAssigneeRepository.Replace\nand every read is hydrated explicitly by repository.hydrateAssignees,\nwhich fills a whole page in ONE query.\n\nAn empty slice means unassigned. A nil slice means \"not hydrated on this\nread path\" — the two are indistinguishable to a JSON consumer (both\nserialize to []) because every path that reaches a consumer hydrates.","type":"array","items":{"$ref":"#/components/schemas/domain.User"}},"checks":{"description":"Checks are one-line \"what to verify\" hints for a test feature.\nPersisted as jsonb (the serializer emits a JSON array string; the\njsonb column parses + stores it natively, keeping it queryable).","type":"array","items":{"type":"string"}},"closedAt":{"type":"string"},"codingAgentRunId":{"description":"CodingAgentRunID is the most recent coding-agent (external service)\nrun launched for this bug. Frontend tails its event stream by\npassing this id back to GET /bugs/:id/agent-build/:runId/events.\nEmpty = no run started yet (or the column predates coding-agent).","type":"string"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"createdBy":{"$ref":"#/components/schemas/domain.User"},"createdById":{"type":"integer"},"createdByUuid":{"description":"CreatedByUUID — see ProjectUUID for the dual-FK rationale.","type":"string"},"description":{"description":"Stored as TEXT so long bug reports — full repros, logs, code blocks —\naren't truncated. Mirrors Comment.Content.","type":"string"},"dueDate":{"type":"string"},"endDate":{"type":"string"},"estimatedMinutes":{"description":"EstimatedMinutes: how long the task is EXPECTED to take, in the same\nunit the logged time uses, so the Time strip can say \"3h of 5h\nestimated\" and draw a burn bar. Real minutes — deliberately NOT derived\nfrom StoryPoints via a ratio (see migration 0014).\n\nNil means NO ESTIMATE and must render as unestimated, never as zero:\nzero is a real value the column also accepts, and collapsing the two\nputs every un-estimated task infinitely over budget. Capped at\nMaxTaskEstimateMinutes by the service.","type":"integer"},"githubBranch":{"description":"GitHub PR linkage. Set by the implementer when it opens a PR; read\nby the webhook receiver to find the right bug when GitHub fires\npull_request events.","type":"string"},"githubPrNumber":{"type":"integer"},"id":{"type":"integer"},"orgId":{"description":"OrgID denormalizes the owning org (tasks.project → project.org). It\nlets org-scoped list/search/authorization queries filter without a\njoin through projects, and is the partition/shard key the schema is\ndesigned around at scale. Backfilled in BeforeCreate from the parent\nproject. Mirrors the denormalization already on task_links /\ntask_similarities.","type":"integer"},"parentId":{"description":"ParentID enables sub-issues — a task may declare another task in\nthe same org as its parent so the UI can render a nested tree.\nNullable; an absent parent means the task is top-level. The FK\npoints back at tasks.id (self-reference). No cascade: deleting a\nparent leaves orphaned ParentID values intact so a follow-up\ncleanup can decide whether to promote them or reparent.","type":"integer"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"projectId":{"type":"integer"},"projectUuid":{"description":"ProjectUUID mirrors ProjectID via Phase E.2.1's migration #14.\nPopulated automatically by GORM when reading from the DB; new\nwrites set both ProjectID (legacy) and ProjectUUID (Phase E\ntarget). Phase E.2.3 will drop ProjectID and rename this to\njust ProjectID-but-as-UUID.","type":"string"},"pullRequestUrl":{"description":"PullRequestURL is a manually-linked GitHub/GitLab pull-request URL\n(M6). Lets a human associate the PR that resolves this task so the\ndetail view can surface a deep link. Free-form; the UI parses the\n\"#123\" number out for display when it recognizes a known host.","type":"string"},"scheduledAt":{"description":"ScheduledAt is a single day a task is *planned* for — distinct from\nDueDate (the deadline) and from the StartDate/EndDate span below.\nIts one live consumer is the per-project .ics calendar feed\n(handler/calendar_handler.go), which emits an all-day VEVENT on\nScheduledAt and falls back to DueDate when it's nil. The web UI only\never reads it — no view writes it; it is set through the REST\nupdate endpoint (`scheduledAt` / `clearScheduledAt`) by API-token\nconsumers. Not exposed by the MCP tools.\nStored as a pure `date` (UTC-midnight invariant) so every teammate\nsees a task on the same calendar day regardless of timezone.","type":"string"},"severity":{"description":"Severity (impact) is distinct from Priority (scheduling) — see the\nSeverity type. Optional; empty means \"not graded\". Indexed so\nlist_tasks can filter security findings by grade (#63).","allOf":[{"$ref":"#/components/schemas/domain.Severity"}]},"sprint":{"description":"Sprint buckets a task into a time-boxed iteration (gated by\nfeatures.sprints). Free-form, but the UI offers the canonical\n\"current\" / \"next\" / \"backlog\" values. Nil = unassigned.","type":"string"},"startDate":{"description":"StartDate / EndDate are the task's planned span and the fields the\nCalendar view is built on: it renders one multi-day bar per task\nfrom them, keeps tasks with either side unset in the backlog panel,\nand writes both on every drag (schedule / move / resize-start /\nresize-end), as does the sprint view's calendar tab. Distinct from\nScheduledAt (a single day) and DueDate (the hard deadline).\nNullable; indexed.","type":"string"},"status":{"description":"Indexed: the kanban board groups by status on every load, and\nlist_tasks accepts a status filter — both table-scan without this\nas the tasks table grows.\nA project COLUMN KEY, not a member of the domain.Status const set —\ncolumns are user-configurable. See apimodel.TaskListItem.Status.","type":"string"},"statusChangedAt":{"description":"StatusChangedAt is when the task last ENTERED the status above. It is\nwhat lets the UI say \"in progress since 09:14\" instead of guessing, and\nit exists as a column because nothing else in the system records a\nstatus transition — the activity log stores the task's title in its\ndetails column, not the field that moved.\n\nMaintained by every write path that touches Status, and ONLY when the\nvalue actually changes: re-sending the current status while editing a\ntitle must not restart the clock. Nil means no transition has been\nobserved (a row older than the column whose updated_at was also null) —\ncallers must render that as unknown, not as zero elapsed.","type":"string"},"storyPoints":{"description":"M4 power-feature fields. All nullable, all only surfaced in the\nUI when the matching per-project toggle is on (see\nProjectFeatures). Storing them on every task regardless keeps\nthe schema simple — a project that later enables the feature\nfinds the column already there.\n\nStoryPoints: agile estimate (gated by features.storyPoints).","type":"integer"},"subIssues":{"description":"SubIssues is populated by TaskService.GetByID — children of this\ntask. Not persisted (gorm:\"-\"); the field is hydrated on read so\nthe task detail endpoint can render the nested list without the\nfrontend making a follow-up request.","type":"array","items":{"$ref":"#/components/schemas/domain.Task"}},"substate":{"description":"Agent pipeline. Empty Substate means the bug isn't in the pipeline —\nit's a plain user-managed task. Once the agent picks it up, Substate\nadvances and Status is kept in sync via SubstateToStatus.","allOf":[{"$ref":"#/components/schemas/domain.Substate"}]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/domain.Tag"}},"targetBranch":{"description":"TargetBranch is the base branch the agent should clone from and open\nthe PR against. Empty means \"use project.GithubDefaultBranch\". Per-bug\noverride so a hotfix can target main while a feature targets staging.","type":"string"},"taskId":{"type":"integer"},"testStatus":{"description":"─── Testing fields (only meaningful when Type == \"test\") ───────────\nTestStatus is the manual-testing state (untested/verified/\nneeds_review/failing) — SEPARATE from Status (the kanban column) so\nthey never collide. Empty for non-test tasks.","allOf":[{"$ref":"#/components/schemas/domain.TestFeatureStatus"}]},"timeSpentMinutes":{"description":"TimeSpentMinutes: total logged minutes (features.timeTracking);\ncost = (TimeSpentMinutes/60) × project hourly rate when\nfeatures.costTracking is on.","type":"integer"},"title":{"type":"string"},"type":{"description":"Type is the row's discriminator in the unified tasks table. For\nBug Go structs this is always \"bug\" — see BeforeCreate. Stored\nas a TEXT column with an index because filter-by-type drives\nevery list endpoint.","allOf":[{"$ref":"#/components/schemas/domain.TaskType"}]},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"},"widgetHtml":{"description":"WidgetHTML preserves a self-contained HTML artifact when a task was\npromoted from a brainstorming-canvas widget card, so the sketch/\nprototype isn't lost — the task detail view renders it in a\nsandboxed iframe. Empty for ordinary tasks.","type":"string"}}},"domain.TaskLink":{"type":"object","properties":{"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"createdById":{"description":"CreatedByID records who made the link (audit / future undo).","type":"integer"},"createdByUuid":{"type":"string"},"id":{"type":"integer"},"orgId":{"description":"OrgID denormalizes the owning org (both tasks must belong to it).\nLets list/delete authorize without joining through projects.","type":"integer"},"sourceId":{"description":"SourceID / TargetID are global task ids (tasks.id).","type":"integer"},"sourceUuid":{"description":"UUID mirrors of the FKs, so the PowerSync client can resolve links to\ntasks locally. Populated in BeforeCreate (Phase E.2.2 pattern).","type":"string"},"targetId":{"type":"integer"},"targetUuid":{"type":"string"},"type":{"$ref":"#/components/schemas/domain.TaskLinkType"},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.TaskLinkType":{"type":"string","enum":["blocks","relates_to","duplicate_of","chain"],"x-enum-varnames":["TaskLinkBlocks","TaskLinkRelatesTo","TaskLinkDuplicateOf","TaskLinkChain"]},"domain.TaskLinkWithRef":{"type":"object","properties":{"id":{"type":"integer"},"task":{"$ref":"#/components/schemas/domain.LinkedTaskRef"},"type":{"$ref":"#/components/schemas/domain.TaskLinkType"}}},"domain.TaskSimilarityStatus":{"type":"string","enum":["suggested","confirmed","dismissed"],"x-enum-varnames":["SimilaritySuggested","SimilarityConfirmed","SimilarityDismissed"]},"domain.TaskType":{"type":"string","enum":["bug","feature","change","test"],"x-enum-varnames":["TaskTypeBug","TaskTypeFeature","TaskTypeChange","TaskTypeTest"]},"domain.TestFeatureStatus":{"type":"string","enum":["untested","verified","needs_review","failing"],"x-enum-varnames":["TestStatusUntested","TestStatusVerified","TestStatusNeedsReview","TestStatusFailing"]},"domain.TimeEntrySource":{"type":"string","enum":["timer","manual","grid","import"],"x-enum-varnames":["TimeEntryTimer","TimeEntryManual","TimeEntryGrid","TimeEntryImport"]},"domain.User":{"type":"object","properties":{"avatarUrl":{"description":"AvatarURL is the user's own avatar (FEAT-250), stored as a small\nclient-resized `data:` URL exactly like Organization.AvatarURL and\nProject.AvatarURL. Validated by ValidateAvatarDataURL in the\nservice layer. Empty = no avatar (the UI falls back to initials).\n\nOnly the user themselves can write this: the endpoint takes the id\nfrom the session, never from the request.","type":"string"},"createdAt":{"description":"CreatedAt/UpdatedAt/DeletedAt land in `timestamptz` columns (the\ngorm-postgres default for time.Time / gorm.DeletedAt).","type":"string"},"displayName":{"description":"DisplayName is the person's own name (migration 0049), or \"\" when\nthey never gave one. THE ONLY name column a human has in this\nschema — `agents.name` covers agents and nothing covered people,\nwhich is why every chat bubble in the native client rendered\n\"someone\".\n\nNever substituted for here. A read path that wants a label uses\nDisplayLabel, which is the single place the email fallback lives;\nbaking the fallback into the column would make \"did this person\nchoose a name\" unanswerable, and a settings field cannot render an\nempty box for a value the server has silently filled in.","type":"string"},"email":{"type":"string"},"id":{"type":"integer"},"isAdmin":{"type":"boolean"},"kind":{"description":"Kind separates people from agent actors (migration 0039). Every\nauthored row in this schema points at users(id) — comments.user_id,\ntasks.created_by_id, the assignee join — so an agent has to be a\nuser to be mentionable, assignable and auditable. This one column\nis what keeps that from also making it a login and a paid seat:\n\n  * every session-issuing seam refuses kind='agent' (see\n    auth_service.go and oauth_service.go), and\n  * orgMemberRepository.CountByOrgID excludes agents, so seats stay\n    a count of people.\n\nDefaulted in the database, so a zero value read back from an old\nrow is impossible; a zero value on an in-memory struct is read as\nhuman via ActorKind, and normalized on insert by userRepository.Create.","allOf":[{"$ref":"#/components/schemas/domain.UserKind"}]},"lastLoginAt":{"type":"string"},"updatedAt":{"type":"string"},"uuid":{"description":"Native Postgres uuid column (UUIDv7, stamped in BeforeCreate). The\nbaseline migration owns the UNIQUE index; the model tag stays a\nplain index so nothing here fights the hand-authored DDL. Stored as\nthe canonical text form via the driver — pgx coerces text↔uuid.","type":"string"}}},"domain.UserKind":{"type":"string","enum":["human","agent"],"x-enum-varnames":["UserKindHuman","UserKindAgent"]},"dto.AccountDeletionCheck":{"type":"object","properties":{"blockers":{"type":"array","items":{"$ref":"#/components/schemas/domain.DeletionBlocker"}},"canDelete":{"type":"boolean"},"reauth":{"description":"Reauth is how the deletion is confirmed: \"password\" (the current\npassword) or \"code\" (a code emailed by POST /account/deletion-code,\nfor an account that has no password).","type":"string","enum":["password","code"]}}},"dto.AddChannelMemberRequest":{"type":"object","properties":{"canExecute":{"description":"CanExecute allows an agent member to act on this channel's context.\nDefault true.","type":"boolean"},"canMention":{"description":"CanMention allows the member to be @-mentioned here. Default true.","type":"boolean"},"canWriteMemory":{"description":"CanWriteMemory allows an agent member to record what it reads here into\nproject memory. Default true. Set false for a channel that should be\nanswered in but never remembered.","type":"boolean"},"role":{"description":"Role is \"admin\", \"member\" or \"viewer\". Defaults to \"member\".","type":"string"},"userUuid":{"description":"UserUUID names the member. Must be a live member of the caller's org.","type":"string"}}},"dto.AgentHandoffRequest":{"type":"object","properties":{"target":{"description":"Target is \"cursor\" or \"claude_code\".","type":"string","enum":["cursor","claude_code"],"example":"cursor"}}},"dto.AuditLogEntry":{"type":"object","properties":{"actorEmail":{"type":"string"},"actorId":{"type":"integer"},"createdAt":{"type":"string"},"event":{"type":"string"},"id":{"type":"integer"},"metadata":{"type":"string"},"targetEmail":{"type":"string"},"targetUserId":{"type":"integer"}}},"dto.BulkInviteRequest":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","maxItems":50,"minItems":1,"items":{"type":"string"}},"role":{"enum":["admin","member","guest"],"allOf":[{"$ref":"#/components/schemas/domain.OrgRole"}]}}},"dto.BulkInviteResult":{"type":"object","properties":{"code":{"type":"string"},"email":{"type":"string"},"message":{"type":"string"},"success":{"type":"boolean"}}},"dto.ChangePasswordRequest":{"type":"object","required":["currentPassword","newPassword"],"properties":{"currentPassword":{"type":"string"},"newPassword":{"type":"string","maxLength":100,"minLength":8}}},"dto.ChatNotificationChannelRequest":{"type":"object","properties":{"level":{"description":"Level is `mentions` or `none`. DELETE the same path to remove the\noverride and follow the account default again.","type":"string"}}},"dto.ChatNotificationDefaultRequest":{"type":"object","properties":{"level":{"description":"Level is `mentions` or `none`. There is no `all`: nothing in this build\nnotifies on a message that does not mention you, so an `all` level would\nbe stored and behave identically to `mentions`. See migration 0057.","type":"string"}}},"dto.CheckoutResponse":{"type":"object","properties":{"url":{"type":"string"}}},"dto.CreateBillingItemRequest":{"type":"object","properties":{"amountCents":{"type":"integer"},"kind":{"$ref":"#/components/schemas/domain.BillingItemKind"},"name":{"type":"string"},"sortOrder":{"type":"integer"},"status":{"$ref":"#/components/schemas/domain.BillingItemStatus"},"taskId":{"description":"TaskID is required for kind \"task_fixed\" and forbidden otherwise.","type":"integer"}}},"dto.CreateChannelRequest":{"type":"object","properties":{"name":{"description":"Name is required. A leading '#' is stripped; names are unique per org,\ncase-insensitively.","type":"string"},"topic":{"description":"Topic is the optional one-line description shown in the channel header.","type":"string"},"visibility":{"description":"Visibility is \"public\" (every non-guest org member can reach it) or\n\"private\" (explicit members only). Defaults to public when omitted.\n\"unlisted\" is rejected — it is reserved for task conversations.","type":"string"}}},"dto.CreateCheckoutRequest":{"type":"object","required":["plan"],"properties":{"currency":{"type":"string"},"plan":{"type":"string"}}},"dto.CreateOrgRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":100,"minLength":1}}},"dto.CreateProjectRequest":{"type":"object","required":["name"],"properties":{"description":{"type":"string","maxLength":500},"name":{"type":"string","maxLength":100,"minLength":1},"templateId":{"description":"TemplateID selects a built-in project template (M1). Empty or\nunknown → the default \"bug-tracker\" template. The template\npre-seeds columns + feature toggles.","type":"string"}}},"dto.CreateTagRequest":{"type":"object","required":["color","name","projectId"],"properties":{"color":{"description":"Hex color format #RRGGBB","type":"string"},"name":{"type":"string","maxLength":50,"minLength":1},"projectId":{"type":"integer"}}},"dto.CreateTaskRequest":{"type":"object","properties":{"assignedToId":{"description":"AssignedToID is the LEGACY single-assignee alias, kept because published\nclients and API-token consumers send it. It means \"the set is exactly\nthis one user\". AssigneeIDs wins when both are present — see\nResolvedAssigneeIDs. Removed by the contract migration's code half.\n\nDeprecated: send assigneeIds.","type":"integer"},"assigneeIds":{"description":"AssigneeIDs is the task's assignee SET. Empty or absent creates the task\nunassigned. Duplicates and zeros are ignored (see ResolvedAssigneeIDs).","type":"array","items":{"type":"integer"}},"description":{"type":"string"},"dueDate":{"description":"DueDate accepts both RFC3339 and bare \"YYYY-MM-DD\" (see FlexDate).","allOf":[{"$ref":"#/components/schemas/dto.FlexDate"}]},"estimatedMinutes":{"description":"EstimatedMinutes is the expected effort in REAL minutes (see\ndomain.Bug.EstimatedMinutes). Absent means no estimate; the column stays\nNULL and the UI renders the task as unestimated.","type":"integer"},"parentId":{"description":"ParentID — when set, the new task becomes a sub-issue of the\nreferenced task. Optional; absent means top-level.","type":"integer"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"projectId":{"type":"integer"},"severity":{"description":"Severity (impact) is orthogonal to Priority (scheduling). Optional.","allOf":[{"$ref":"#/components/schemas/domain.Severity"}]},"sprint":{"type":"string"},"status":{"description":"A project COLUMN KEY, not a member of the domain.Status const set — the\nwrite side of the same truth the read models carry. Verified: PATCH with\n\"needs_qa\" (a real column on project 44) returns 200 and reads back,\nbecause Go does not check const-set membership when unmarshalling into a\nnamed string type. So the closed enum was the SPEC's invention, and it\nmade the generated clients unable to express a move to any column\noutside the canonical four — iOS had to hand-build that one request.\nNote this DTO deliberately has no `oneof` validation, unlike the\nbug/feature DTOs whose enum really is closed.","type":"string"},"storyPoints":{"description":"M4 power-feature fields (gated in the UI by project toggles).","type":"integer"},"targetBranch":{"description":"TargetBranch is meaningful only when Type==bug; ignored otherwise.\nKept on the request shape so the frontend doesn't need a\ndifferent DTO per type.","type":"string"},"timeSpentMinutes":{"type":"integer"},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/domain.TaskType"},"widgetHtml":{"description":"WidgetHTML carries a self-contained HTML artifact when creating a\ntask from a brainstorming-canvas widget card (promote flow).","type":"string"}}},"dto.CreateTimeEntryRequest":{"type":"object","properties":{"billable":{"description":"Billable omitted defaults to true, matching the column default.","type":"boolean"},"durationMinutes":{"type":"integer"},"entrySource":{"$ref":"#/components/schemas/domain.TimeEntrySource"},"notes":{"type":"string"},"startedAt":{"description":"StartedAt accepts both RFC3339 and bare \"YYYY-MM-DD\" (see FlexDate) —\nthe week grid logs against a day, not a clock time.","allOf":[{"$ref":"#/components/schemas/dto.FlexDate"}]},"taskId":{"type":"integer"},"userId":{"description":"UserID logs the entry against someone else. Admin only; omit for self.","type":"integer"}}},"dto.CreateTopicRequest":{"type":"object","properties":{"name":{"description":"Name is required, trimmed, at most 48 characters, and unique within the\nchannel case-insensitively. A channel may hold at most 12 live topics —\nenforced by trg_topics_cap in migration 0044, not by this endpoint.","type":"string"}}},"dto.DeleteAccountRequest":{"type":"object","properties":{"code":{"description":"Code is required when it has none.","type":"string"},"confirmEmail":{"description":"ConfirmEmail is the account's own email address, typed by the person.","type":"string"},"password":{"description":"Password is required when the account has one.","type":"string"}}},"dto.DeleteAccountResponse":{"type":"object","properties":{"deleted":{"type":"boolean"}}},"dto.DeleteOrgRequest":{"type":"object","properties":{"code":{"description":"Code is required when it has none.","type":"string"},"confirmName":{"description":"ConfirmName is the organization's name, typed by the owner.","type":"string"},"password":{"description":"Password is required when the account has one.","type":"string"}}},"dto.DeleteOrgResponse":{"type":"object","properties":{"deleted":{"type":"boolean"},"newWorkspace":{"description":"NewWorkspace is true when NextOrgID was created by this deletion.","type":"boolean"},"nextOrgId":{"description":"NextOrgID is the organization the caller continues in: one of their\nother organizations, or a new empty workspace when this was the last.","type":"integer"}}},"dto.DeregisterPushDeviceRequest":{"type":"object","properties":{"platform":{"description":"Platform is \"apns\" or \"fcm\".","type":"string","example":"apns"},"token":{"description":"Token is the device token to retire.","type":"string"}}},"dto.EditMessageRequest":{"type":"object","properties":{"body":{"type":"string"}}},"dto.ExportAPIToken":{"type":"object","properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"lastUsedAt":{"type":"string"},"name":{"type":"string"},"tokenPrefix":{"type":"string"}}},"dto.ExportAccount":{"type":"object","properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"id":{"type":"integer"},"isAdmin":{"type":"boolean"},"lastLoginAt":{"type":"string"}}},"dto.ExportComment":{"type":"object","properties":{"bugId":{"type":"integer"},"content":{"type":"string"},"createdAt":{"type":"string"},"featureId":{"type":"integer"},"id":{"type":"integer"},"projectId":{"type":"integer"}}},"dto.ExportOrgMember":{"type":"object","properties":{"joinedAt":{"type":"string"},"name":{"type":"string"},"plan":{"type":"string"},"role":{"type":"string"},"slug":{"type":"string"}}},"dto.ExportTask":{"type":"object","properties":{"createdAt":{"type":"string"},"priority":{"type":"string"},"projectId":{"type":"integer"},"status":{"type":"string"},"taskId":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}}},"dto.FlexDate":{"type":"object","properties":{"time.Time":{"type":"string"}}},"dto.ForgotPasswordRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},"dto.GetStartedResponse":{"type":"object","properties":{"mcpConnected":{"description":"MCPConnected: the org has made its first MCP call (step 1).","type":"boolean"},"sampleProjectId":{"description":"SampleProjectID is the sample project (step 2), absent once it was deleted.","type":"integer"},"teamInvited":{"description":"TeamInvited: a teammate was invited or has joined (step 3).","type":"boolean"},"visible":{"type":"boolean"}}},"dto.InviteMemberRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","maxLength":255},"projects":{"description":"Projects the invitee joins on redemption. Empty is legitimate: an admin\nreaches every project without a grant, and a member invited with no\nprojects simply has nothing to open yet.","type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/dto.ProjectGrantInput"}},"role":{"enum":["admin","member","guest"],"allOf":[{"$ref":"#/components/schemas/domain.OrgRole"}]}}},"dto.LoginRequest":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"}}},"dto.MarkChannelReadRequest":{"type":"object","properties":{"seq":{"type":"integer"}}},"dto.MarkTopicReadRequest":{"type":"object","properties":{"seq":{"type":"integer"}}},"dto.MuteTopicRequest":{"type":"object","properties":{"muted":{"type":"boolean"}}},"dto.OpenDMRequest":{"type":"object","properties":{"participantUuids":{"type":"array","items":{"type":"string"}}}},"dto.OrgDeletionCheck":{"type":"object","properties":{"canDelete":{"description":"CanDelete is true for an owner of the org.","type":"boolean"},"hasAccountingRecords":{"description":"HasAccountingRecords: a subscription, time entries, billing rates or\nitems belong to the org. They are kept for the statutory period, so\nthe org row stays (deleted, unreachable) until they may go.","type":"boolean"},"hasSubscription":{"description":"HasSubscription: the org has a Stripe customer or subscription row; a\nsubscription that has not ended is cancelled first.","type":"boolean"},"orgName":{"type":"string"},"otherMembers":{"description":"OtherMembers counts the other people in the org (agents excluded).\nThey lose access when it is deleted.","type":"integer"},"otherOrgs":{"description":"OtherOrgs counts the caller's other organizations. With none left, a\nnew empty workspace is created so the account can still sign in.","type":"integer"},"reauth":{"description":"Reauth is \"password\" or \"code\" (POST /orgs/:id/deletion-code).","type":"string","enum":["password","code"]}}},"dto.PendingInvite":{"type":"object","properties":{"email":{"type":"string"},"expiresAt":{"type":"string"},"id":{"type":"integer"},"orgId":{"type":"integer"},"orgName":{"type":"string"},"role":{"$ref":"#/components/schemas/domain.OrgRole"},"token":{"description":"always \"\" post-hash migration","type":"string"}}},"dto.PinChannelRequest":{"type":"object","properties":{"pinned":{"type":"boolean"}}},"dto.PortalResponse":{"type":"object","properties":{"url":{"type":"string"}}},"dto.PresenceStatusRequest":{"type":"object","properties":{"status":{"description":"Status is `active`, `away`, `dnd`, or \"\" to clear the manual override and\nfall back to inferring presence from the heartbeat.","type":"string"}}},"dto.ProjectGrantInput":{"type":"object","required":["projectId","role"],"properties":{"projectId":{"type":"integer"},"role":{"enum":["admin","member","viewer"],"allOf":[{"$ref":"#/components/schemas/domain.ProjectRole"}]}}},"dto.PushPreferencesPatchRequest":{"type":"object","properties":{"enabled":{"description":"Enabled is the master switch. false stops all push for this user\nwithout touching their device registrations.","type":"boolean"},"quietHoursEnd":{"type":"string"},"quietHoursStart":{"description":"QuietHoursStart / QuietHoursEnd bound a nightly no-push window as\n\"HH:MM\" (24-hour) in QuietHoursTimeZone. End <= Start wraps past\nmidnight, which is the \"22:00 to 07:00\" case. All three are set\ntogether or all three cleared with \"\"; a half-set window is rejected\nwith 400 rather than stored as something that would silently never\napply.","type":"string"},"quietHoursTimeZone":{"description":"QuietHoursTimeZone is an IANA zone name such as \"Europe/Athens\".\nRequired whenever a window is set: delivery runs in a background\nworker with no request to infer an offset from.","type":"string"},"types":{"description":"Types maps a notification type (\"mention\", \"assigned\",\n\"unassigned\", \"status_change\", \"comment\", \"sub_issue_created\",\n\"task_created\") to whether it may be pushed. Sending the object\nREPLACES the stored map — a per-key merge would leave a client no\nway to un-set an override. A type absent from the map is allowed, so\na type introduced in a later release is not silently muted for\neveryone who saved preferences before it existed. An unknown key is\nrejected with 400 naming the legal set.","type":"object","additionalProperties":{"type":"boolean"}}}},"dto.ReactionRequest":{"type":"object","properties":{"emoji":{"description":"Emoji is a SHORTCODE — `thumbsup`, `+1`, `shipit` — with or without the\nsurrounding colons every emoji picker emits. Unicode glyphs are refused\nby domain.NormalizeEmoji; see migration 0053 for why.","type":"string"}}},"dto.RegisterPushDeviceRequest":{"type":"object","properties":{"appVersion":{"description":"AppVersion is the client build, recorded so a delivery regression\ncan be attributed to a release. Optional.","type":"string","example":"1.4.0"},"platform":{"description":"Platform is \"apns\" (iOS) or \"fcm\" (Android).","type":"string","example":"apns"},"token":{"description":"Token is the device token the OS handed the app, verbatim.","type":"string"}}},"dto.RegisterRequest":{"type":"object","required":["email","password"],"properties":{"displayName":{"description":"DisplayName is the person's own name, and it is OPTIONAL.\n\nOptional because requiring it would break every existing caller —\nthe e2e suite, the MCP onboarding flow and the web sign-up form all\npost without it — and because a name is a courtesy to teammates,\nnot a credential. Omitting it leaves users.display_name = \"\" and\nthe reader falls back to the email's local part\n(domain.User.DisplayLabel), which is what happened before this\nfield existed.\n\nBounded at 80 to match ck_users_display_name_len (migration 0049).","type":"string","maxLength":80},"email":{"type":"string","maxLength":255},"inviteToken":{"type":"string"},"orgName":{"type":"string","maxLength":100},"password":{"type":"string","maxLength":100,"minLength":8}}},"dto.RequestDeletionCodeResponse":{"type":"object","properties":{"devCode":{"type":"string"},"sent":{"type":"boolean"}}},"dto.ResetPasswordRequest":{"type":"object","required":["newPassword","token"],"properties":{"newPassword":{"type":"string","maxLength":100,"minLength":8},"token":{"type":"string"}}},"dto.SearchHit":{"type":"object","properties":{"id":{"type":"integer"},"projectId":{"type":"integer"},"projectName":{"type":"string"},"taskId":{"description":"for tasks (bug/feature/change), the human-facing task number","type":"integer"},"title":{"type":"string"},"type":{"description":"\"project\", \"bug\", \"feature\", or \"change\"","type":"string"}}},"dto.SendMessageRequest":{"type":"object","properties":{"attachmentUuids":{"description":"AttachmentUUIDs claims files ALREADY UPLOADED to this channel, in the\norder they should render (migration 0056).\n\nUuids, never file bytes: uploading is a separate, earlier request\n(POST /channels/:uuid/attachments) so that a slow 100MB upload does not\nhold the message hostage, per-file progress can be shown before the user\ncommits to sending, and a retry of a failed send does not re-upload a\nfile that already landed. It is the same two-phase shape Slack and\nDiscord both settled on.\n\nA message carrying attachments may have an EMPTY body — dragging in a\nscreenshot and pressing send without typing is the common case, not an\nedge one.\n\nEvery uuid must be an unclaimed attachment of THIS channel. One from\nanother conversation is reported as not-found rather than forbidden, so\nthe answer never confirms that a file exists somewhere the caller cannot\nsee.","type":"array","items":{"type":"string"}},"body":{"description":"Body is the message text.","type":"string"},"contentType":{"description":"ContentType is \"text\" (default) or \"markdown\".","type":"string"},"replyToUuid":{"description":"ReplyToUUID optionally quotes another message in the SAME channel.\n\nA POINTER, never a container. It renders as an inline quoted bubble in the\nsame stream (the iMessage / Telegram / WhatsApp shape) and clicking it\nscrolls to the quoted message. There is no thread view, no thread panel\nand no \"also send to channel\", because there are no threads.","type":"string"},"topicUuid":{"description":"TopicUUID optionally TAGS the message with one of the channel's topics.\n\nThe client sends the topic whose tab is currently active in its composer —\ntyping while a topic tab is selected auto-tags the message with that\ntopic. Empty is normal and correct: tagging is OPTIONAL, an untagged\nmessage appears in the \"All\" tab, and the server never infers a tag from\nthe text or from the previous message.\n\nA topic uuid belonging to a different channel is rejected rather than\naccepted: a message carrying a foreign tag would be invisible in every tab\nwhile still looking tagged.","type":"string"},"uuid":{"description":"UUID is the client-minted UUIDv7 idempotency key.","type":"string"}}},"dto.SentInvite":{"type":"object","properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"expiresAt":{"type":"string"},"id":{"type":"integer"},"role":{"$ref":"#/components/schemas/domain.OrgRole"}}},"dto.SetProjectColumnsRequest":{"type":"object","properties":{"columns":{"description":"Columns is the complete new set, in board order. A column's position is\nits place in this array unless positions say otherwise (see the service).","type":"array","items":{"$ref":"#/components/schemas/domain.ProjectColumn"}},"landingColumn":{"description":"LandingColumn names the column new tasks land in. nil keeps the current\none, \"\" clears it. It must be a column of the new set, or a removed column\nthat Move sends elsewhere (it then follows its tasks). A set with more than\none triage-type column must name one.","type":"string"},"move":{"description":"Move sends the tasks of a REMOVED column to a column of the new set:\n{\"old_key\": \"new_key\"}. A removed column that still has tasks and no entry\nhere refuses the whole request.","type":"object","additionalProperties":{"type":"string"}}}},"dto.StartTimerRequest":{"type":"object","properties":{"taskId":{"type":"integer"}}},"dto.SubscriptionResponse":{"type":"object","properties":{"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"type":"integer"},"customerId":{"type":"string"},"graceUntil":{"description":"GraceUntil is the unix deadline of the 3-day past-due grace window\n(set when status == \"past_due\"). nil otherwise.","type":"integer"},"plan":{"type":"string"},"status":{"type":"string"}}},"dto.TransferOwnershipRequest":{"type":"object","required":["newOwnerUserId"],"properties":{"newOwnerUserId":{"type":"integer"}}},"dto.UpdateAvatarRequest":{"type":"object","properties":{"avatarUrl":{"type":"string"}}},"dto.UpdateBillingItemRequest":{"type":"object","properties":{"amountCents":{"type":"integer"},"name":{"type":"string"},"sortOrder":{"type":"integer"},"status":{"$ref":"#/components/schemas/domain.BillingItemStatus"}}},"dto.UpdateChannelRequest":{"type":"object","properties":{"archived":{"description":"Archived ends (or reopens) the conversation. Unlike name and topic it is\naccepted on every kind — a task conversation cannot be renamed, but it\ncan certainly be finished.","type":"boolean"},"name":{"type":"string"},"topic":{"type":"string"}}},"dto.UpdateMemberRoleRequest":{"type":"object","required":["role"],"properties":{"role":{"enum":["owner","admin","member","guest"],"allOf":[{"$ref":"#/components/schemas/domain.OrgRole"}]}}},"dto.UpdateOrgBillingSettingsRequest":{"type":"object","properties":{"currency":{"type":"string"},"defaultBillableCents":{"type":"integer"},"defaultCostCents":{"type":"integer"}}},"dto.UpdateOrgRequest":{"type":"object","properties":{"aiEnabled":{"description":"AIEnabled is a pointer so nil means \"leave unchanged\": a client that only\nrenames the org must not switch AI off by omitting the field.","type":"boolean"},"avatarUrl":{"type":"string"},"name":{"type":"string","maxLength":100,"minLength":1}}},"dto.UpdatePreferencesRequest":{"type":"object","properties":{"aiImproveStrength":{"description":"AIImproveStrength is one of \"slight\", \"balanced\" or \"strong\"\n(domain.AIImproveStrength). Anything else is rejected with 400.","type":"string"},"aiOutputLanguage":{"description":"AIOutputLanguage is \"author\" (write back in the author's own\nlanguage) or \"english\" (domain.AIOutputLanguage). Anything else is\nrejected with 400.","type":"string"},"push":{"description":"Push is the mobile push policy. nil means \"this request did not\nmention push\", which is not the same as \"push, with everything\ncleared\" — see PushPreferencesPatchRequest.","allOf":[{"$ref":"#/components/schemas/dto.PushPreferencesPatchRequest"}]}}},"dto.UpdateProjectRequest":{"type":"object","properties":{"archived":{"type":"boolean"},"avatarUrl":{"description":"AvatarURL sets the project avatar (feat-69). nil = no change,\n\"\" clears. Must be a `data:image/...` URL ≤ 100 KB (service-\nenforced).","type":"string"},"columns":{"description":"JSON-encoded []domain.ProjectColumn; nil = no change","type":"string"},"description":{"type":"string","maxLength":500},"features":{"description":"Features, when non-nil, replaces the project's feature toggles\nwholesale (M1). nil = no change. The settings UI always sends\nthe full set so partial-update semantics aren't needed.","allOf":[{"$ref":"#/components/schemas/domain.ProjectFeatures"}]},"name":{"type":"string","maxLength":100,"minLength":1}}},"dto.UpdateTagRequest":{"type":"object","properties":{"color":{"description":"Hex color format #RRGGBB","type":"string"},"name":{"type":"string","maxLength":50,"minLength":1}}},"dto.UpdateTaskRequest":{"type":"object","properties":{"assignedToId":{"description":"AssignedToID is the LEGACY single-assignee alias. null unassigns; 0 also\nunassigns (the shape the pre-set web client sent); a value makes the set\nexactly that one user. AssigneeIDs wins when both are present.\n\nDeprecated: send assigneeIds.","type":"integer"},"assigneeIds":{"description":"AssigneeIDs REPLACES the whole assignee set. `[]` and `null` both\nunassign the task; absent leaves the set untouched.\n\nReplace, not add/remove, and deliberately so:\n\n  - It is what PATCH already means for every other field on this DTO.\n    `{\"priority\":\"high\"}` does not merge with the old priority, and a\n    reader has no reason to expect `{\"assigneeIds\":[7]}` to merge either.\n  - The UI holding the set is a multi-select: it always knows the whole\n    intended set, so add/remove would make it compute a diff the server\n    then has to trust. A replace makes the client's state the request.\n  - It is idempotent, which the PowerSync offline upload queue needs —\n    a replayed queued PATCH must not add the same person twice or,\n    worse, apply a remove that has since been undone.\n  - Add/remove would need its own vocabulary (addAssignees /\n    removeAssignees) with no other caller, and two ways to write one\n    field is exactly how the two drift.\n\nThe cost is last-write-wins between two people editing assignees at the\nsame moment. That is the same concurrency model every other field here\nhas, and assignment is a low-frequency, human-timescale edit.","type":"array","items":{"type":"integer"}},"clearScheduledAt":{"description":"ClearScheduledAt, when true, nulls out scheduled_at.\n\nDeprecated: send `scheduledAt: null` instead — ScheduledAt is a\nNullable now, so an explicit null clears the column on its own. The\nflag predates that and is part of the published client contract\n(packages/core UpdateBugRequest / UpdateFeatureRequest), so it is\nstill honoured and still takes precedence over ScheduledAt.","type":"boolean"},"description":{"type":"string"},"dueDate":{"description":"DueDate accepts both RFC3339 and bare \"YYYY-MM-DD\" (see FlexDate).\nnull or \"\" clears it.","type":"string"},"endDate":{"type":"string"},"estimatedMinutes":{"description":"EstimatedMinutes: null clears the estimate, returning the task to\nunestimated. 0 is a value, not a clear.","type":"integer"},"parentId":{"description":"ParentID re-parents the task (feat-181): null (or 0) promotes it back\nto top-level, a value nests it under that task, absent leaves the link\nalone. Rejected when it would close a cycle or push the tree past\nrepository.MaxTaskDepth.\n\nNullable rather than *uint for the reason the type exists: \"no parent\"\nis a state the client has to be able to REQUEST, and a *uint cannot\ntell an explicit null from an absent key — un-nesting a task would be\nindistinguishable from not mentioning it. 0 is accepted as a second\nspelling of the clear because that is what the MCP tool already takes.","type":"integer"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"pullRequestUrl":{"description":"M6: manually-linked PR URL. null or \"\" clears the link.","type":"string"},"scheduledAt":{"description":"ScheduledAt sets the single planned day the .ics calendar feed plots\nthe task on (see domain.Bug.ScheduledAt). null or \"\" clears it.\nAccepts both RFC3339 and bare \"YYYY-MM-DD\" (see FlexDate).","type":"string"},"severity":{"description":"Severity (impact) — null or \"\" clears the grade.","type":"string","enum":["critical","high","medium","low","info"]},"sprint":{"description":"Sprint: null or \"\" clears the bucket; a non-empty value sets it.","type":"string"},"startDate":{"description":"The Calendar view's planned span. null or \"\" clears; a value sets.\nFlexDate accepts RFC3339 or bare \"YYYY-MM-DD\".","type":"string"},"status":{"description":"See CreateTaskRequest.Status — a column key, not the closed enum.","type":"string"},"storyPoints":{"description":"M4 power-feature fields. null clears the estimate / the logged time.","type":"integer"},"targetBranch":{"description":"TargetBranch: null or \"\" falls the task back to the project default.","type":"string"},"timeSpentMinutes":{"type":"integer"},"title":{"type":"string"}}},"dto.UpdateTimeEntryRequest":{"type":"object","properties":{"billable":{"type":"boolean"},"durationMinutes":{"type":"integer"},"notes":{"type":"string"},"startedAt":{"$ref":"#/components/schemas/dto.FlexDate"}}},"dto.UpdateTopicRequest":{"type":"object","properties":{"name":{"type":"string"},"position":{"description":"Position is the explicit tab order. Human-set rather than derived: sorting\nby name would reshuffle the bar the moment somebody renames a lane, and\nsorting by activity would make the bar move under the cursor.","type":"integer"}}},"dto.UpsertBillingRateRequest":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/domain.RateKind"},"projectId":{"type":"integer"},"rateCents":{"type":"integer"},"scope":{"$ref":"#/components/schemas/domain.RateScope"},"taskId":{"type":"integer"},"userId":{"type":"integer"}}},"dto.UserDataExport":{"type":"object","properties":{"_notice":{"type":"string"},"account":{"$ref":"#/components/schemas/dto.ExportAccount"},"apiTokens":{"type":"array","items":{"$ref":"#/components/schemas/dto.ExportAPIToken"}},"authoredTasks":{"type":"array","items":{"$ref":"#/components/schemas/dto.ExportTask"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/dto.ExportComment"}},"exportedAt":{"type":"string"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/dto.ExportOrgMember"}}}},"handler.AddMemberRequest":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/domain.ProjectRole"},"userId":{"type":"integer"}}},"handler.AgentRunResponse":{"type":"object","properties":{"error":{"type":"string"},"eventSeq":{"type":"integer"},"executorUserId":{"type":"integer"},"messageUuid":{"type":"string"},"requesterUserId":{"type":"integer"},"state":{"type":"string"},"tier":{"type":"string"},"uuid":{"type":"string"}}},"handler.BugReportRequest":{"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"stepsToReproduce":{"type":"string"}}},"handler.ChatRequest":{"type":"object","properties":{"message":{"type":"string"},"pageContext":{"type":"string"}}},"handler.ContactRequest":{"type":"object","properties":{"email":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"subject":{"type":"string"}}},"handler.CreateAgentRequest":{"type":"object","properties":{"avatarUrl":{"description":"AvatarURL is the agent's logo as a small client-resized `data:image/...`\nURL, the same shape and the same 100KB cap as dto.UpdateAvatarRequest.\nIt is written to the agent's ACTOR row (users.avatar_url), because\nmigration 0048 deliberately gives `agents` no avatar column.","type":"string"},"handle":{"description":"Handle is what people type after '@'. Lowercased and validated against\nck_agents_handle_shape; a leading '@' is accepted and stripped.","type":"string"},"instructions":{"description":"Instructions is the persona prompt, at most 16KB.","type":"string"},"invocationScope":{"type":"string"},"name":{"description":"Name is the display name, 1-80 characters.","type":"string"},"policyProfile":{"type":"string"},"projectScope":{"description":"ProjectScope, PolicyProfile and InvocationScope default to what the org's\nown BugBuddy is minted with. 'selected' is refused here — see\nAgentService.CreateAgent.","type":"string"}}},"handler.CreateGenericCredential":{"type":"object","properties":{"kind":{"description":"\"ssh_key\" | \"pat\"","type":"string"},"label":{"type":"string"},"privateKeyPEM":{"type":"string"},"publicKey":{"type":"string"},"token":{"type":"string"},"username":{"type":"string"}}},"handler.CreateGenericRequest":{"type":"object","properties":{"cloneUrl":{"type":"string"},"credential":{"$ref":"#/components/schemas/handler.CreateGenericCredential"},"defaultBranch":{"type":"string"},"host":{"type":"string"},"indexedBranch":{"type":"string"},"isPrimary":{"type":"boolean"},"name":{"type":"string"},"owner":{"type":"string"},"provider":{"description":"\"git_ssh\" | \"git_https\"","type":"string"}}},"handler.DecideConsentRequest":{"type":"object","properties":{"status":{"description":"Status is one of approved / denied / revoked.","allOf":[{"$ref":"#/components/schemas/domain.ConsentStatus"}]}}},"handler.DeleteAttachmentsRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"integer"}}}},"handler.DraftCommentRequest":{"type":"object","properties":{"context":{"type":"string"},"taskType":{"type":"string"}}},"handler.DraftIssueRequest":{"type":"object","properties":{"projectId":{"type":"integer"},"title":{"type":"string"},"type":{"description":"bug | feature | change","type":"string"}}},"handler.EnrollDeviceRequest":{"type":"object","properties":{"label":{"type":"string"},"maxConcurrent":{"description":"MaxConcurrent is bounded to 1..16 by ck_agent_devices_max_concurrent.","type":"integer"},"platform":{"type":"string"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/domain.DeviceScope"}}}},"handler.EnrollDeviceResponse":{"type":"object","properties":{"deviceUuid":{"type":"string"},"label":{"type":"string"},"secret":{"description":"Secret is shown once and is never retrievable again — only its sha256 is\nstored. A \"show me the secret again\" endpoint would make the database a\nset of live credentials, which is the thing hashing it prevents.","type":"string"}}},"handler.GenerateDescriptionRequest":{"type":"object","properties":{"description":{"description":"current description","type":"string"},"taskType":{"description":"\"bug\", \"feature\" or \"change\"","type":"string"},"title":{"description":"current title","type":"string"}}},"handler.GenerateTitleRequest":{"type":"object","properties":{"description":{"description":"current description","type":"string"},"taskType":{"description":"\"bug\", \"feature\" or \"change\"","type":"string"},"title":{"description":"current title","type":"string"}}},"handler.InvokeAgentRequest":{"type":"object","properties":{"handle":{"description":"Handle is the agent that was mentioned, with or without the '@'.","type":"string"},"messageUuid":{"description":"MessageUUID is the message the mention appeared in.","type":"string"},"needsWorkspace":{"description":"NeedsWorkspace declares that the ask requires a checkout. False — the\ncommon case — routes to tier 0 and never touches a device.","type":"boolean"},"repoKey":{"description":"RepoKey is the sha256 identity of the repository a workspace-bound turn\nneeds. Never a path and never a URL.","type":"string"},"requiredScopes":{"description":"RequiredScopes are the device capabilities the turn needs.","type":"array","items":{"$ref":"#/components/schemas/domain.DeviceScope"}},"topicUuid":{"description":"TopicUUID optionally tags the reply with the tab the question was asked\nunder.","type":"string"}}},"handler.MCPOAuthApproveRequest":{"type":"object","properties":{"orgId":{"type":"integer"},"projectIds":{"description":"ProjectIDs empty means every project the person reaches in the org,\nincluding ones created later.","type":"array","items":{"type":"integer"}},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/domain.Action"}}}},"handler.MCPOAuthConsentResponse":{"type":"object","properties":{"clientHost":{"description":"ClientHost is the host of the client's metadata document URL; empty for a\nclient that registered itself and has no verifiable origin.","type":"string"},"clientId":{"type":"string"},"clientName":{"description":"ClientName is the name the client gave itself, a claim.","type":"string"},"expiresAt":{"type":"string"},"loopbackOnly":{"description":"LoopbackOnly is true when the client can only be reached on the user's own\nmachine; the screen warns about it.","type":"boolean"},"redirectDisplay":{"type":"string"},"redirectUri":{"type":"string"},"requestId":{"type":"string"},"requestedScopes":{"description":"RequestedScopes is the most the person can grant: what the client asked\nfor, or the default pair when it asked for none.","type":"array","items":{"$ref":"#/components/schemas/domain.Action"}}}},"handler.MCPOAuthGrantResponse":{"type":"object","properties":{"clientName":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"},"lastUsedAt":{"type":"string"},"orgId":{"type":"integer"},"orgName":{"type":"string"},"projectIds":{"type":"array","items":{"type":"integer"}},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/domain.Action"}}}},"handler.MCPOAuthRedirectResponse":{"type":"object","properties":{"redirectUrl":{"type":"string"}}},"handler.PutBugRepositoriesRequest":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"integer"}},"targetBranches":{"type":"object","additionalProperties":{"type":"string"}}}},"handler.PutProjectPreferencesRequest":{"type":"object","properties":{"defaultRepositoryIds":{"type":"array","items":{"type":"integer"}}}},"handler.StartImportFileRequest":{"type":"object","properties":{"token":{"description":"Token is the file's token from POST /public-tools/board-files (\"f_...\").","type":"string"}}},"handler.StartImportRequest":{"type":"object","properties":{"email":{"description":"Email is the Atlassian account the Jira API token was issued to. Unused\nfor ClickUp and Trello.","type":"string"},"key":{"description":"Key is the Trello API key. Unused for ClickUp.","type":"string"},"oauth":{"description":"OAuth marks a ClickUp OAuth token rather than a personal one. It changes\nthe wire format: personal tokens go in a bare Authorization header,\nOAuth tokens need a \"Bearer \" prefix.","type":"boolean"},"site":{"description":"Site is the Jira Cloud site URL (\"https://acme.atlassian.net\"). Unused\nfor ClickUp and Trello.","type":"string"},"source":{"description":"\"clickup\" | \"trello\" | \"jira\"","type":"string"},"token":{"description":"Token is the ClickUp personal/OAuth token, the Trello user token, or the\nJira Cloud API token.","type":"string"}}},"handler.StopActivationEmailsRequest":{"type":"object","properties":{"token":{"type":"string"}}},"handler.UpdateAgentRequest":{"type":"object","properties":{"avatarUrl":{"type":"string"},"enabled":{"type":"boolean"},"instructions":{"type":"string"},"invocationScope":{"type":"string"},"name":{"type":"string"},"policyProfile":{"type":"string"},"projectScope":{"type":"string"}}},"handler.UpdateBugRepoRequest":{"type":"object","properties":{"prStatus":{"type":"string"}}},"handler.UpdateRepoRequest":{"type":"object","properties":{"indexedBranch":{"type":"string"},"isPrimary":{"type":"boolean"}}},"handler.UpdateRoleRequest":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/domain.ProjectRole"}}},"repository.ChannelActor":{"type":"object","properties":{"avatarUrl":{"type":"string"},"canExecute":{"type":"boolean"},"canMention":{"type":"boolean"},"canWriteMemory":{"type":"boolean"},"displayName":{"description":"DisplayName is the person's own name (users.display_name, migration\n0049), empty when they never set one.\n\nSeparate from Name rather than coalesced into it because the two answer\ndifferent questions from different tables — agents.name is what an agent\nIS CALLED and is never absent, users.display_name is what a person CHOSE\nand usually is. Merging them would make an empty result ambiguous\nbetween \"an agent with no name\" (impossible) and \"a person who did not\nset one\" (normal), and the client's fallback rule differs for each: an\nagent falls back to its handle, a person to the local part of the email.","type":"string"},"email":{"type":"string"},"handle":{"description":"Handle is the agent's @-mention handle, empty for a person. Carried so a\npicker can show what typing the agent's name will look like without a\nsecond round-trip to /agents.","type":"string"},"joinedAt":{"description":"JoinedAt is when the membership row was written. Nil for an addable actor.","type":"string"},"kind":{"type":"string"},"member":{"description":"Member distinguishes a current member from an addable actor without a\nclient having to infer it from an empty Role.","type":"boolean"},"name":{"description":"Name is the agent's display name (agents.name), empty for a person.\nCarried because an agent's ADDRESS is a reserved `.invalid` string with\nthe org id baked into its local part — deriving a label from it renders\n'BugBuddy' as \"Bugbuddy Org 1\". A person's name is DisplayName below.","type":"string"},"role":{"description":"Role is the CHANNEL role, empty when this actor is not a member.","type":"string"},"userId":{"description":"UserID is the server's row id, and it is on the wire because two other\nchat payloads already speak in these ids and nothing else can translate\nthem: apimodel.TaskAnchor.AssigneeIDs (who is on the @BUG-241 a message\nmentions) and agent_runs.executorUserId (whose machine a run is on).\n\nA client without a local mirror of `users` — the native app — otherwise\nholds a list of numbers it can never turn into people, and the live task\nchip has to render \"2 assigned\" instead of who. No new exposure: the same\nid is already serialised by MemberUser.ID on the org and project rosters.\nAddressing is still by uuid everywhere; this is for JOINING, not routing.","type":"integer"},"userUuid":{"type":"string"}}},"service.AIChatResponse":{"type":"object","properties":{"message":{"type":"string"},"toolCalls":{"type":"array","items":{"$ref":"#/components/schemas/service.ToolCall"}}}},"service.CanvasBoard":{"type":"object","properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/domain.CanvasCard"}},"edges":{"type":"array","items":{"$ref":"#/components/schemas/domain.CanvasEdge"}}}},"service.CanvasCardDetail":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/domain.CanvasCard"},"linkedTasks":{"type":"array","items":{"$ref":"#/components/schemas/domain.Task"}},"people":{"type":"array","items":{"$ref":"#/components/schemas/domain.User"}}}},"service.DraftIssueResult":{"type":"object","properties":{"description":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}},"priority":{"type":"string"},"title":{"type":"string"}}},"service.PersistedChatMessage":{"type":"object","properties":{"content":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"integer"},"pageContext":{"type":"string"},"role":{"type":"string"},"scope":{"type":"string"}}},"service.TodayFocusTask":{"type":"object","properties":{"dueDate":{"type":"string"},"id":{"type":"integer"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"projectId":{"type":"integer"},"projectName":{"type":"string"},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/service.TodayReason"}},"status":{"description":"A project COLUMN KEY, not a member of the domain.Status const set —\ncolumns are user-configurable. See apimodel.TaskListItem.Status.","type":"string"},"taskId":{"type":"integer"},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/domain.TaskType"}}},"service.TodayProject":{"type":"object","properties":{"avatarUrl":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"openCount":{"type":"integer"},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/service.TodayReason"}}}},"service.TodayReason":{"type":"object","properties":{"label":{"type":"string"},"tone":{"type":"string"}}},"service.TodayResult":{"type":"object","properties":{"date":{"description":"the local date the list was computed for","type":"string"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/service.TodayProject"}},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/service.TodayFocusTask"}}}},"service.ToolCall":{"type":"object","properties":{"arguments":{"type":"object","additionalProperties":true},"name":{"type":"string"}}},"service.TopTask":{"type":"object","properties":{"dueDate":{"type":"string"},"id":{"type":"integer"},"priority":{"$ref":"#/components/schemas/domain.Priority"},"projectId":{"type":"integer"},"projectName":{"type":"string"},"status":{"description":"A project COLUMN KEY, not a member of the domain.Status const set —\ncolumns are user-configurable. See apimodel.TaskListItem.Status.","type":"string"},"taskId":{"type":"integer"},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/domain.TaskType"}}},"service.TopTasksResult":{"type":"object","properties":{"dueTodayCount":{"description":"DueTodayCount and OverdueCount are disjoint: a task is counted in\nexactly one of them, or neither.","type":"integer"},"openCount":{"description":"OpenCount is every unfinished task the caller is involved in.","type":"integer"},"overdueCount":{"type":"integer"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/service.TopTask"}}}}}}}