{"openapi":"3.1.0","info":{"title":"Atlas Public API","version":"1.0.0","summary":"Public REST API for Atlas tasks, projects, webhooks, and PATs.","description":"Authenticate with `Authorization: Bearer <token>` where `<token>` is either\na Personal Access Token (prefixed `atlas_pat_`) or an OAuth access JWT.\n\n**Scopes (PAT only).** PAT-authenticated calls must carry one of the scopes listed under\n`x-required-scopes` for the route. Session/JWT calls bypass scope checks.\n\n**Rate limits.** Each route is classified `read | write | ai`. Defaults are 300/m, 60/m,\n20/m respectively, configurable per-tenant via the `PUBLIC_API_RATE_OVERRIDES` env\nJSON. Exceeding a bucket returns 429 with a `Retry-After` header.\n\n**Idempotency.** All POST routes accept an `Idempotency-Key` header; replays within 24h\nreturn the original 2xx response.\n\n**IP allowlist (PAT only).** PATs minted with an `allowedIps` list reject calls from\noutside the list with 403 `pat-ip-blocked`.","contact":{"name":"Atlas Developer Relations","url":"https://api-production-50c0.up.railway.app/v1/docs"},"x-scopes":{"tasks:read":"Read your tasks (list, get, search).","tasks:write":"Create and update tasks (status, priority, schedule, assignee).","tasks:delete":"Archive or permanently delete tasks.","projects:read":"Read your projects, including dependencies, risks, budget, and OKR linkage.","projects:write":"Create and update projects, dependencies, risks, and budget.","goals:read":"Read your Objectives and Key Results.","goals:write":"Create and update Objectives and Key Results, including project linkage.","search:read":"Search Atlas content across the modules your account can already access.","ai:read":"Run read-only AI queries (Ask Atlas, search).","ai:write":"Run AI workflows that mutate state (NL capture creates tasks).","calendar:read":"Read calendar events, availability, booking metadata, and scheduling conflicts.","calendar:write":"Create, reschedule, cancel, and update calendar-backed bookings.","comments:read":"Read comments and discussion threads on work items you can access.","comments:write":"Create and update comments on work items you can access.","webhooks:manage":"Create, update, and revoke outbound webhooks.","pats:manage":"List, create, and revoke other Personal Access Tokens. Sensitive - grant sparingly.","profile:read":"Read your profile (name, email, timezone, locale, additional fields, About page, org chart).","profile:write":"Update your profile - including the additional fields landed in 1.16.0 (display name, manager, certifications, education, languages, working hours, About page).","appointments:read":"Read your confirmed bookings (upcoming meetings, history, ICS feed).","appointments:write":"Reschedule, cancel, no-show, send reminders, and edit private host notes on appointments."},"x-rate-limits":{"read":{"default":"300/m","description":"GET requests on /v1/* (excluding /v1/ai/*)"},"write":{"default":"60/m","description":"POST/PATCH/PUT/DELETE on /v1/*"},"ai":{"default":"20/m","description":"Any /v1/ai/* call (read or write)"}},"x-discovery":{"mcp":"/.well-known/atlas-mcp.json","docs":"/v1/docs"}},"servers":[{"url":"https://api-production-50c0.up.railway.app","description":"Production"},{"url":"/","description":"Same-origin (when reading the spec from the deployed API)"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"PAT (atlas_pat_...) or JWT","description":"Mint a PAT at /settings/api-access. Pick the narrowest scope set that fits the workload - start with `read-only` and widen only as needed."}},"schemas":{"WebhookEventName":{"type":"string","minLength":1,"maxLength":100,"description":"Event name to subscribe to (e.g. `task.created`, `task.completed`, `comment.created`). Use `*` to receive every event Atlas publishes.","example":"task.created"},"CreateWebhookInput":{"type":"object","required":["url","events"],"description":"Body for `POST /v1/webhooks`. `url` must be a public https endpoint; loopback / private-network targets are rejected. Optional owner labels and an escalation email power the dead-letter notification path.","properties":{"url":{"type":"string","format":"uri","minLength":1,"maxLength":2048,"description":"Public HTTPS receiver. http://, file://, ssrf-prone hosts are rejected at validation time."},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventName"},"minItems":1,"maxItems":50,"description":"Atlas only fires deliveries for the events listed here. Use `[\"*\"]` to receive every event type."},"ownerLabel":{"type":"string","minLength":1,"maxLength":120,"nullable":true,"description":"Optional team / service label shown in the deliveries dashboard."},"escalationEmail":{"type":"string","format":"email","maxLength":320,"nullable":true,"description":"Atlas emails this address when the webhook hits EXHAUSTED retry state."},"escalationNote":{"type":"string","minLength":1,"maxLength":400,"nullable":true,"description":"Inline runbook excerpt included in the escalation email."}}},"UpdateWebhookInput":{"type":"object","description":"Body for `PATCH /v1/webhooks/{id}`. Every field is optional, but at least one must be supplied. Pause a webhook via `{ \"disabled\": true }`.","properties":{"url":{"type":"string","format":"uri","minLength":1,"maxLength":2048},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventName"},"minItems":1,"maxItems":50},"ownerLabel":{"type":"string","minLength":1,"maxLength":120,"nullable":true},"escalationEmail":{"type":"string","format":"email","maxLength":320,"nullable":true},"escalationNote":{"type":"string","minLength":1,"maxLength":400,"nullable":true},"disabled":{"type":"boolean"}},"minProperties":1},"Webhook":{"type":"object","required":["id","url","events","enabled","consecutiveFailures","createdAt"],"description":"Public webhook subscription row. Signing secret is omitted from every list / read; it is returned ONCE at create / rotate time.","properties":{"id":{"type":"string","example":"wh_01HW3T2K8X9Y2VPRZGQX9NDY1D"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventName"}},"enabled":{"type":"boolean","description":"Mirrors the inverse of `disabled` so legacy clients keep working."},"ownerLabel":{"type":"string","nullable":true},"escalationEmail":{"type":"string","format":"email","nullable":true},"escalationNote":{"type":"string","nullable":true},"lastSuccessAt":{"type":"string","format":"date-time","nullable":true},"lastFailureAt":{"type":"string","format":"date-time","nullable":true},"consecutiveFailures":{"type":"integer","minimum":0,"description":"Reset to 0 after any 2xx delivery."},"createdAt":{"type":"string","format":"date-time"}}},"WebhookCreateResponse":{"type":"object","required":["webhook","secret"],"description":"Returned ONCE on create. The plaintext `secret` is the HMAC-SHA256 signing key sent in `X-Atlas-Signature` on every delivery.","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","description":"Plaintext signing secret (`whsec_*`). Atlas stores only a hash and will never return it again - capture it now.","example":"whsec_3xK7p9aQzL2m...REDACTED-32-CHARS"}}},"WebhookRotateResponse":{"type":"object","required":["webhook","secret","previousSecretExpiresAt"],"description":"Returned ONCE on rotate. The previous secret remains valid until `previousSecretExpiresAt` so receivers can roll forward without an outage window.","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","example":"whsec_4yL8q0bRzM3n..."},"previousSecretExpiresAt":{"type":"string","format":"date-time"}}},"WebhookDeliveryStatus":{"type":"string","enum":["pending","sending","success","failed","dead"],"description":"`pending` = queued, `sending` = currently dispatching, `success` = 2xx received, `failed` = retriable error, `dead` = retries exhausted."},"AdminWebhookDelivery":{"type":"object","required":["id","webhookId","event","status","attempt","createdAt"],"description":"Delivery row returned by the admin dashboard (`/v1/admin/webhooks/deliveries`). Includes a richer status enum and cursor-paginated.","properties":{"id":{"type":"string","example":"whd_01HW3T2K8X9Y2VPRZGQX9NDY1F"},"webhookId":{"type":"string","example":"wh_01HW3T2K8X9Y2VPRZGQX9NDY1D"},"event":{"type":"string","example":"task.created"},"status":{"$ref":"#/components/schemas/WebhookDeliveryStatus"},"statusCode":{"type":"integer","nullable":true},"attempt":{"type":"integer","minimum":1},"maxAttempts":{"type":"integer","minimum":1},"nextAttemptAt":{"type":"string","format":"date-time","nullable":true},"durationMs":{"type":"integer","nullable":true},"errorMessage":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"AdminWebhookDeliveryPayload":{"type":"object","required":["delivery","request","response"],"description":"Full payload + response capture for a single delivery, served by `/v1/admin/webhooks/deliveries/{id}/payload`. The bodies may be truncated to 64KiB.","properties":{"delivery":{"$ref":"#/components/schemas/AdminWebhookDelivery"},"request":{"type":"object","required":["url","method","headers"],"properties":{"url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["POST"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":"string","nullable":true},"bodyTruncated":{"type":"boolean"}}},"response":{"type":"object","properties":{"statusCode":{"type":"integer","nullable":true},"headers":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"body":{"type":"string","nullable":true},"bodyTruncated":{"type":"boolean"}}}}},"Notification":{"type":"object","required":["id","kind","title","createdAt"],"description":"A single inbox row for the calling user. `readAt` / `archivedAt` / `snoozedUntil` track lifecycle; `context` carries denormalised projectId / actorId / target link fields used by the FE click-through.","properties":{"id":{"type":"string","example":"ntf_01HW3T2K8X9Y2VPRZGQX9NDY40"},"kind":{"type":"string","description":"Event subtype. Common values: `task.assigned`, `comment.mention`, `goal.due-soon`, `webhook.failed`.","example":"comment.mention"},"title":{"type":"string"},"body":{"type":"string","nullable":true},"link":{"type":"string","nullable":true,"description":"Deep link the FE navigates to on click (relative path, e.g. `/tasks/tsk_...`)."},"context":{"type":"object","nullable":true,"description":"Denormalised payload - includes `projectId`, `taskId`, `authorId`, etc. when relevant.","additionalProperties":true},"readAt":{"type":"string","format":"date-time","nullable":true},"archivedAt":{"type":"string","format":"date-time","nullable":true},"snoozedUntil":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"NotificationListSummary":{"type":"object","required":["total","unread","archived","snoozed"],"properties":{"total":{"type":"integer","minimum":0},"unread":{"type":"integer","minimum":0},"archived":{"type":"integer","minimum":0},"snoozed":{"type":"integer","minimum":0}}},"NotificationListResponse":{"type":"object","required":["items","unread","summary"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"nextCursor":{"type":"string","nullable":true},"unread":{"type":"integer","minimum":0},"summary":{"$ref":"#/components/schemas/NotificationListSummary"}}},"NotificationPreferences":{"type":"object","required":["channels","digest"],"description":"Per-user notification preferences. PATCH semantics merge; only supplied keys are touched.","properties":{"kinds":{"type":"object","description":"Per-kind preference. Keys are notification kinds (`task.assigned`, `comment.mention`, etc.).","additionalProperties":{"type":"string","enum":["all","none","mentions_only"]}},"channels":{"type":"object","required":["inApp","push","email"],"properties":{"inApp":{"type":"boolean"},"push":{"type":"boolean"},"email":{"type":"boolean"}}},"digest":{"type":"string","enum":["instant","daily"]},"quietHours":{"type":"object","nullable":true,"required":["start","end","tz"],"properties":{"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"22:00"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"07:00"},"tz":{"type":"string","example":"America/Los_Angeles"}}},"lastSeenAt":{"type":"string","format":"date-time"}}},"SnoozeNotificationInput":{"type":"object","required":["until"],"properties":{"until":{"type":"string","format":"date-time","description":"When the notification should re-appear in the inbox. ISO 8601 with offset.","example":"2026-06-07T09:00:00-07:00"}}},"SnoozePreset":{"type":"object","required":["id","label","wakeAt"],"properties":{"id":{"type":"string","example":"tomorrow_morning"},"label":{"type":"string","example":"Tomorrow morning"},"wakeAt":{"type":"integer","description":"Unix epoch milliseconds.","example":1717747200000}}},"NotificationDigest":{"type":"object","required":["windowStart","windowEnd","unread","items"],"properties":{"windowStart":{"type":"string","format":"date-time"},"windowEnd":{"type":"string","format":"date-time"},"unread":{"type":"integer","minimum":0},"items":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}},"PushSubscribeWebInput":{"type":"object","required":["platform","endpoint","keys"],"properties":{"platform":{"type":"string","enum":["WEB"]},"endpoint":{"type":"string","format":"uri","minLength":1,"maxLength":2048},"keys":{"type":"object","required":["p256dh","auth"],"properties":{"p256dh":{"type":"string","minLength":1,"maxLength":2048,"description":"VAPID p256 public key (base64-url)."},"auth":{"type":"string","minLength":1,"maxLength":2048,"description":"VAPID auth secret (base64-url)."}}},"deviceLabel":{"type":"string","minLength":1,"maxLength":120}}},"PushSubscribeExpoInput":{"type":"object","required":["platform"],"description":"`endpoint` and/or `token` carry the Expo push token (one is required).","properties":{"platform":{"type":"string","enum":["EXPO"]},"endpoint":{"type":"string","minLength":1,"maxLength":2048},"token":{"type":"string","minLength":1,"maxLength":2048,"description":"Expo push token (`ExponentPushToken[xxxx]` / `ExpoPushToken[xxxx]`)."},"deviceLabel":{"type":"string","minLength":1,"maxLength":120}}},"PushSubscribeInput":{"oneOf":[{"$ref":"#/components/schemas/PushSubscribeWebInput"},{"$ref":"#/components/schemas/PushSubscribeExpoInput"}],"discriminator":{"propertyName":"platform"}},"PushSubscription":{"type":"object","required":["id","platform","createdAt"],"properties":{"id":{"type":"string","example":"psub_01HW3T2K8X9Y2VPRZGQX9NDY55"},"platform":{"type":"string","enum":["WEB","EXPO"]},"endpointDigest":{"type":"string","description":"SHA-256 prefix of the endpoint URL / token. Surfaces in the device-management UI without leaking the raw secret."},"deviceLabel":{"type":"string","nullable":true,"example":"iPhone 15 - Safari"},"lastSeenAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"EmailTemplate":{"type":"object","required":["id","key","locale","subject","htmlBody","textBody","isActive","isOverride","version","createdAt"],"description":"A per-tenant email template row. When `isOverride` is `false` this is the system-shipped default surfaced through the same resolver, so the editor can show a \"shipped default\" badge.","properties":{"id":{"type":"string","example":"etpl_01HW3T2K8X9Y2VPRZGQX9NDY60"},"tenantId":{"type":"string"},"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]*$","example":"task.assignment","description":"Slug matching the system-template registry (`<area>.<event>`)."},"locale":{"type":"string","minLength":2,"maxLength":16,"example":"en"},"version":{"type":"integer","minimum":0},"subject":{"type":"string","minLength":1,"maxLength":998},"htmlBody":{"type":"string"},"textBody":{"type":"string"},"isActive":{"type":"boolean"},"variantOfTemplateId":{"type":"string","nullable":true,"description":"Set when this row is an A/B variant of another template."},"trafficPct":{"type":"integer","minimum":0,"maximum":100,"nullable":true},"isOverride":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"UpsertEmailTemplateInput":{"type":"object","required":["key","subject","htmlBody","textBody"],"description":"PUT body for `/v1/email-templates`. Idempotent - `(key, locale)` is the natural key.","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]*$","example":"task.assignment"},"locale":{"type":"string","minLength":2,"maxLength":16,"default":"en"},"subject":{"type":"string","minLength":1,"maxLength":998},"htmlBody":{"type":"string","minLength":1,"maxLength":200000},"textBody":{"type":"string","minLength":1,"maxLength":200000},"isActive":{"type":"boolean","default":true},"variantOfTemplateId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"trafficPct":{"type":"integer","minimum":0,"maximum":100,"nullable":true}}},"PreviewEmailTemplateInput":{"type":"object","required":["key"],"description":"POST body for `/v1/email-templates/preview`. Inline subject/body overrides let the editor preview unsaved drafts.","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]*$"},"locale":{"type":"string","default":"en"},"subject":{"type":"string","minLength":1,"maxLength":998},"htmlBody":{"type":"string","minLength":1,"maxLength":200000},"textBody":{"type":"string","minLength":1,"maxLength":200000},"variables":{"type":"object","additionalProperties":true,"description":"Free-form sample variables substituted into the template at render time.","example":{"firstName":"Jordan","taskTitle":"Ship public API"}}}},"EmailTemplatePreviewResponse":{"type":"object","required":["subject","html","text","key","locale","usedOverride"],"properties":{"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"key":{"type":"string"},"locale":{"type":"string"},"usedOverride":{"type":"boolean","description":"true when the preview used the tenant override; false for the system default."}}},"TestSendEmailTemplateInput":{"type":"object","required":["key","toEmail"],"properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]*$"},"locale":{"type":"string","default":"en"},"toEmail":{"type":"string","format":"email"},"variables":{"type":"object","additionalProperties":true}}},"EmailTemplateTestSendResponse":{"type":"object","required":["mailto","subject","toEmail"],"properties":{"mailto":{"type":"string","description":"RFC 6068 mailto: link the FE opens to launch the user mail client."},"subject":{"type":"string"},"toEmail":{"type":"string","format":"email"}}},"EmailTemplateVariant":{"type":"object","required":["id","templateId","locale","subject","bodyHtml","bodyText","createdAt"],"properties":{"id":{"type":"string"},"templateId":{"type":"string"},"locale":{"type":"string","minLength":2,"maxLength":16},"subject":{"type":"string","maxLength":998},"bodyHtml":{"type":"string","maxLength":200000},"bodyText":{"type":"string","maxLength":200000},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"UpsertEmailTemplateVariantInput":{"type":"object","required":["subject","bodyHtml","bodyText"],"properties":{"subject":{"type":"string","minLength":1,"maxLength":998},"bodyHtml":{"type":"string","minLength":1,"maxLength":200000},"bodyText":{"type":"string","minLength":1,"maxLength":200000}}},"IntegrationsCatalogEntry":{"type":"object","required":["id","name","status"],"properties":{"id":{"type":"string","example":"slack"},"name":{"type":"string","example":"Slack"},"category":{"type":"string","nullable":true,"example":"messaging"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["available","connected","requires-setup","unavailable"],"description":"Aggregate state across the calling tenant."},"docsUrl":{"type":"string","format":"uri","nullable":true},"installUrl":{"type":"string","format":"uri","nullable":true},"scopes":{"type":"array","items":{"type":"string"},"nullable":true}}},"IntegrationsCatalogResponse":{"type":"object","required":["integrations"],"properties":{"integrations":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationsCatalogEntry"}}}},"SlackChannelSummary":{"type":"object","required":["id","name","isPrivate","isMember"],"properties":{"id":{"type":"string","example":"C0123456789"},"name":{"type":"string","example":"launch-room"},"isPrivate":{"type":"boolean"},"isMember":{"type":"boolean","description":"true when the Atlas bot is already in the channel; false means the caller must `/invite` it before posts work."}}},"SlackInstallation":{"type":"object","required":["id","teamId","teamName","installedAt"],"properties":{"id":{"type":"string"},"teamId":{"type":"string","example":"T0123456789"},"teamName":{"type":"string","example":"Acme Industries"},"botUserId":{"type":"string","nullable":true},"defaultChannelId":{"type":"string","nullable":true},"installedById":{"type":"string","nullable":true},"installedAt":{"type":"string","format":"date-time"}}},"UpdateSlackInstallationInput":{"type":"object","required":["defaultChannelId"],"properties":{"defaultChannelId":{"type":"string","nullable":true,"description":"Slack channel id (`C...`) used for tenant-wide announcements. Pass `null` to clear."}}},"GitHubInstallation":{"type":"object","required":["id","installationId","accountLogin","accountType","createdAt"],"properties":{"id":{"type":"string"},"installationId":{"type":"string","description":"GitHub installation id (BigInt as string)."},"accountLogin":{"type":"string","example":"acme-eng"},"accountType":{"type":"string","enum":["User","Organization"]},"createdAt":{"type":"string","format":"date-time"}}},"GitHubLink":{"type":"object","required":["id","taskId","url","kind","createdAt"],"properties":{"id":{"type":"string"},"taskId":{"type":"string"},"url":{"type":"string","format":"uri"},"kind":{"type":"string","enum":["ISSUE","PR"]},"owner":{"type":"string","example":"acme-eng"},"repo":{"type":"string","example":"atlas"},"number":{"type":"integer"},"title":{"type":"string","nullable":true},"state":{"type":"string","nullable":true,"example":"open"},"createdAt":{"type":"string","format":"date-time"}}},"CreateGitHubLinkInput":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"GitHub issue or PR URL (e.g. `https://github.com/acme-eng/atlas/issues/42`)."}}},"SamlConnection":{"type":"object","required":["id","tenantSlug","configured"],"description":"Public-facing SAML connection row. The private key + raw IdP cert are never returned - only fingerprint metadata so the admin can confirm the config.","properties":{"id":{"type":"string"},"tenantSlug":{"type":"string","example":"acme"},"configured":{"type":"boolean"},"disabled":{"type":"boolean"},"entityId":{"type":"string","nullable":true,"description":"IdP-issued entity id."},"ssoUrl":{"type":"string","format":"uri","nullable":true,"description":"IdP-side SSO endpoint."},"spEntityId":{"type":"string","nullable":true,"description":"SP entity id Atlas advertises (defaults to `${apiBase}/v1/sso/${tenantSlug}/metadata`)."},"wantAuthnRequestsSigned":{"type":"boolean"},"wantAssertionsEncrypted":{"type":"boolean"},"provisioningMode":{"type":"string","enum":["TENANT_MEMBER","AUTO_PROVISION"]},"attributeMap":{"type":"object","additionalProperties":{"type":"string"},"description":"Maps IdP attribute names → Atlas user columns (e.g. `{ \"department\": \"department\" }`)."},"groupRoleMap":{"type":"object","additionalProperties":{"type":"string","enum":["OWNER","ADMIN","MEMBER","GUEST"]},"description":"Maps IdP group names → Atlas roles. Super-admin only."},"x509CertFingerprint":{"type":"string","nullable":true,"description":"SHA-256 fingerprint of the IdP signing cert."},"spMetadataUrl":{"type":"string","format":"uri","nullable":true,"description":"Convenience: where to fetch the SP metadata XML."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"SamlUpsertInput":{"type":"object","description":"PUT body for `/v1/settings/sso`. Either provide `idpMetadataXml` (Atlas parses it) OR explicit `entityId` + `ssoUrl` + `x509Cert`. At least one field must be supplied; the service enforces required fields on the first create.","properties":{"idpMetadataXml":{"type":"string","nullable":true,"description":"Raw IdP metadata XML (signed or unsigned)."},"entityId":{"type":"string","minLength":1,"maxLength":512},"ssoUrl":{"type":"string","format":"uri","maxLength":2048},"x509Cert":{"type":"string","description":"PEM-encoded IdP signing cert."},"spEntityId":{"type":"string","minLength":1,"maxLength":512,"nullable":true},"wantAuthnRequestsSigned":{"type":"boolean"},"wantAssertionsEncrypted":{"type":"boolean"},"spPrivateKey":{"type":"string","nullable":true,"description":"PEM-encoded SP private key for signing AuthnRequests / decrypting assertions. Stored encrypted at rest."},"provisioningMode":{"type":"string","enum":["TENANT_MEMBER","AUTO_PROVISION"]}},"minProperties":1},"SamlTestInput":{"type":"object","required":["samlResponse"],"properties":{"samlResponse":{"type":"string","description":"Base64-encoded SAMLResponse captured from a real IdP login attempt."}}},"SamlVerifiedAssertion":{"type":"object","required":["nameId","email","attributes","responseId","issuedAt"],"properties":{"nameId":{"type":"string"},"email":{"type":"string","format":"email"},"displayName":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"attributes":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"responseId":{"type":"string"},"inResponseTo":{"type":"string","nullable":true},"issuedAt":{"type":"string","format":"date-time"}}},"SamlAttributeMapPatchInput":{"type":"object","required":["attributeMap"],"description":"Super-admin only. Unknown atlas fields are silently dropped; the service whitelists writable columns.","properties":{"attributeMap":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":64}}}},"SamlGroupRoleMapPatchInput":{"type":"object","required":["groupRoleMap"],"description":"Super-admin only. Maps IdP group names → Atlas tenant role.","properties":{"groupRoleMap":{"type":"object","additionalProperties":{"type":"string","enum":["OWNER","ADMIN","MEMBER","GUEST"]}}}},"Task":{"type":"object","required":["id","tenantId","projectId","title","version","status","createdAt"],"description":"A single task. The canonical shape returned by every read endpoint.","properties":{"id":{"type":"string","description":"Stable, globally unique task id.","example":"tsk_01HW3T..."},"tenantId":{"type":"string","description":"Owning tenant id; matches the caller.","example":"tnt_01HW3T..."},"projectId":{"type":"string","description":"Project the task lives in.","example":"prj_01HW3T..."},"parentId":{"type":"string","nullable":true,"description":"Parent task id when this is a subtask."},"title":{"type":"string","description":"Short, human-readable summary.","example":"Ship public API + MCP"},"description":{"type":"string","nullable":true,"description":"Long-form description, supports markdown."},"visibility":{"type":"string","enum":["SHARED","PRIVATE"],"description":"SHARED is visible to every tenant member; PRIVATE only to assignees + creator."},"recurrence":{"type":"string","enum":["NONE","DAILY","WEEKLY","MONTHLY"],"description":"Recurrence cadence. NONE = one-off."},"priority":{"type":"string","enum":["NONE","LOW","MEDIUM","HIGH","URGENT"],"description":"Importance ranking; NONE = unset."},"status":{"type":"string","description":"Current status. Custom statuses per-tenant; common values: TODO, IN_PROGRESS, DONE."},"version":{"type":"integer","minimum":0,"description":"Optimistic-concurrency version. Pass in `If-Match` to a PATCH to prevent lost updates."},"dueOn":{"type":"string","format":"date-time","nullable":true,"description":"Hard deadline. ISO-8601 UTC."},"startsOn":{"type":"string","format":"date-time","nullable":true,"description":"Earliest start time."},"remindAt":{"type":"string","format":"date-time","nullable":true,"description":"Reminder fire time."},"estimateMin":{"type":"integer","minimum":0,"nullable":true,"description":"Time estimate in minutes."},"deletedAt":{"type":"string","format":"date-time","nullable":true,"description":"Soft-delete timestamp; null when live."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateTaskInput":{"type":"object","required":["projectId","title"],"description":"Body for `POST /v1/tasks`. Every field beyond `projectId` + `title` is optional.","properties":{"projectId":{"type":"string","example":"prj_01HW3T..."},"title":{"type":"string","minLength":1,"maxLength":400,"example":"Draft launch announcement"},"description":{"type":"string"},"visibility":{"type":"string","enum":["SHARED","PRIVATE"]},"recurrence":{"type":"string","enum":["NONE","DAILY","WEEKLY","MONTHLY"]},"priority":{"type":"string","enum":["NONE","LOW","MEDIUM","HIGH","URGENT"]},"status":{"type":"string"},"dueOn":{"type":"string","format":"date-time"},"startsOn":{"type":"string","format":"date-time"},"remindAt":{"type":"string","format":"date-time"},"estimateMin":{"type":"integer","minimum":0},"parentId":{"type":"string"}}},"TaskDependencyCreateInput":{"type":"object","required":["toTaskId"],"properties":{"toTaskId":{"type":"string"},"kind":{"type":"string","enum":["BLOCKS","DUPLICATES","RELATES"]}}},"TaskDependencySummary":{"type":"object","required":["id","projectId","title","status","priority","visibility"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["NONE","LOW","MEDIUM","HIGH","URGENT"]},"visibility":{"type":"string","enum":["SHARED","PRIVATE"]},"startsOn":{"type":"string","format":"date-time","nullable":true},"dueOn":{"type":"string","format":"date-time","nullable":true}}},"TaskDependency":{"type":"object","required":["direction","kind","task"],"properties":{"direction":{"type":"string","enum":["blockedBy","blocking"]},"kind":{"type":"string","enum":["BLOCKS","DUPLICATES","RELATES"]},"task":{"$ref":"#/components/schemas/TaskDependencySummary"}}},"TaskDependencies":{"type":"object","required":["blockedBy","blocking"],"properties":{"blockedBy":{"type":"array","items":{"$ref":"#/components/schemas/TaskDependency"}},"blocking":{"type":"array","items":{"$ref":"#/components/schemas/TaskDependency"}}}},"Pat":{"type":"object","required":["id","name","prefix","scopes","allowedIps","createdAt","lastUsedAt","expiresAt","revokedAt"],"description":"Personal Access Token, never includes the raw secret.","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":120,"description":"Human-friendly label set at mint time."},"prefix":{"type":"string","minLength":10,"maxLength":14,"description":"First 14 chars of the raw token (`atlas_pat_xxxx`); safe to log."},"scopes":{"type":"array","maxItems":32,"uniqueItems":true,"items":{"type":"string","enum":["tasks:read","tasks:write","tasks:delete","projects:read","projects:write","goals:read","goals:write","search:read","ai:read","ai:write","calendar:read","calendar:write","comments:read","comments:write","webhooks:manage","pats:manage","profile:read","profile:write","appointments:read","appointments:write"]},"description":"Scopes this token is allowed to use. See `info.x-scopes`."},"allowedIps":{"type":"array","maxItems":32,"uniqueItems":true,"items":{"type":"string","minLength":2,"maxLength":64,"description":"IPv4/IPv6 literal or CIDR allowlist entry."},"description":"IPv4/IPv6 literal or CIDR IP allowlist. Empty = no restriction."},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true}}},"CreatePatInput":{"type":"object","required":["name"],"description":"Body for `POST /v1/pats`. Defaults: `scopes` empty (no permission), `allowedIps` empty (any IP).","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"Slack ingestion bot"},"scopes":{"type":"array","items":{"type":"string","enum":["tasks:read","tasks:write","tasks:delete","projects:read","projects:write","goals:read","goals:write","search:read","ai:read","ai:write","calendar:read","calendar:write","comments:read","comments:write","webhooks:manage","pats:manage","profile:read","profile:write","appointments:read","appointments:write"]},"maxItems":32,"uniqueItems":true,"default":[],"description":"Pick the narrowest set that fits the workload. See `info.x-scopes`.","example":["tasks:read","projects:read","profile:read"]},"allowedIps":{"type":"array","items":{"type":"string","minLength":2,"maxLength":64,"description":"IPv4/IPv6 literal or CIDR allowlist entry."},"maxItems":32,"uniqueItems":true,"default":[],"description":"IPv4/IPv6 literals or CIDR ranges. Empty/omitted = any IP.","example":["203.0.113.4"]},"expiresAt":{"type":"string","format":"date-time","description":"Optional expiration. Omit for tokens that never expire (not recommended)."}}},"RotatePatInput":{"type":"object","description":"Optional overrides for `POST /v1/pats/{id}/rotate`. Omit the body to preserve name, scopes, IP allowlist, and expiry from the previous PAT.","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"type":"array","items":{"type":"string","enum":["tasks:read","tasks:write","tasks:delete","projects:read","projects:write","goals:read","goals:write","search:read","ai:read","ai:write","calendar:read","calendar:write","comments:read","comments:write","webhooks:manage","pats:manage","profile:read","profile:write","appointments:read","appointments:write"]},"maxItems":32,"uniqueItems":true},"allowedIps":{"type":"array","items":{"type":"string","minLength":2,"maxLength":64,"description":"IPv4/IPv6 literal or CIDR allowlist entry."},"maxItems":32,"uniqueItems":true},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Optional replacement expiration. Send null to clear the expiry."}}},"RawPatToken":{"type":"string","minLength":20,"pattern":"^atlas_pat_[A-Za-z0-9_-]+$","description":"Raw bearer token returned once. Persist it securely before leaving the response."},"HrTicketCategory":{"type":"string","enum":["LEAVE","PAYROLL","BENEFITS","DOCUMENTS","POLICY","IT_ACCESS","OTHER"],"description":"Coarse classification used for routing + analytics."},"HrTicketStatus":{"type":"string","enum":["OPEN","IN_PROGRESS","WAITING_ON_EMPLOYEE","RESOLVED","CLOSED"],"description":"Lifecycle. Only HR can set RESOLVED/CLOSED."},"HrTicketPriority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"HrTicketMessage":{"type":"object","required":["id","ticketId","authorId","body","isInternalNote","createdAt"],"properties":{"id":{"type":"string","example":"hrm_01HW3T..."},"ticketId":{"type":"string","example":"hrt_01HW3T..."},"authorId":{"type":"string","description":"User id of the message author."},"body":{"type":"string","maxLength":5000},"isInternalNote":{"type":"boolean","description":"When true, only HR admins see the message. Never set on the self-service surface."},"createdAt":{"type":"string","format":"date-time"}}},"HrTicket":{"type":"object","required":["id","employeeId","category","subject","body","status","priority","messages","createdAt","updatedAt"],"description":"A single HR helpdesk ticket. Returned by both the admin and self-service surfaces.","properties":{"id":{"type":"string","example":"hrt_01HW3T..."},"employeeId":{"type":"string","example":"emp_01HW3T..."},"category":{"$ref":"#/components/schemas/HrTicketCategory"},"subject":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":5000},"status":{"$ref":"#/components/schemas/HrTicketStatus"},"priority":{"$ref":"#/components/schemas/HrTicketPriority"},"assignedToId":{"type":"string","nullable":true,"description":"HR agent currently owning the ticket."},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"satisfactionRating":{"type":"integer","minimum":1,"maximum":5,"nullable":true,"description":"Star rating supplied by the employee after resolution."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/HrTicketMessage"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateOwnHrTicketInput":{"type":"object","required":["category","subject","body"],"description":"Self-service ticket body. `employeeId` is resolved from the session, never accepted from the client.","properties":{"category":{"$ref":"#/components/schemas/HrTicketCategory"},"subject":{"type":"string","minLength":1,"maxLength":200,"example":"Leave balance looks wrong"},"body":{"type":"string","minLength":1,"maxLength":5000,"example":"My casual leave is showing 4 days; I only used 1 day this quarter."},"priority":{"$ref":"#/components/schemas/HrTicketPriority"}}},"AssignHrTicketInput":{"type":"object","required":["assignedToId"],"description":"Pass `null` to unassign.","properties":{"assignedToId":{"type":"string","nullable":true,"example":"usr_01HW3T..."}}},"ChangeHrTicketPriorityInput":{"type":"object","required":["priority"],"properties":{"priority":{"$ref":"#/components/schemas/HrTicketPriority"}}},"ChangeHrTicketStatusInput":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/HrTicketStatus"}}},"PostAdminHrTicketMessageInput":{"type":"object","required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":5000},"isInternalNote":{"type":"boolean","default":false,"description":"When true, hides the message from the employee timeline (HR-only note)."}}},"PostOwnHrTicketMessageInput":{"type":"object","required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":5000}}},"RateHrTicketInput":{"type":"object","required":["satisfactionRating"],"properties":{"satisfactionRating":{"type":"integer","minimum":1,"maximum":5,"example":5}}},"HrPolicy":{"type":"object","required":["id","slug","title","category","version","body","requiresAcknowledgement","effectiveFrom","createdAt","updatedAt"],"description":"Versioned company policy. Editing bumps `version` and invalidates prior acknowledgements.","properties":{"id":{"type":"string","example":"pol_01HW3T..."},"slug":{"type":"string","maxLength":120,"example":"code-of-conduct"},"title":{"type":"string","maxLength":240,"example":"Code of Conduct"},"category":{"type":"string","maxLength":80,"example":"Conduct"},"version":{"type":"integer","minimum":1,"description":"Monotonic per policy id."},"body":{"type":"string","description":"Long-form markdown body, up to 200,000 chars."},"requiresAcknowledgement":{"type":"boolean"},"effectiveFrom":{"type":"string","format":"date","example":"2026-01-01"},"supersededAt":{"type":"string","format":"date-time","nullable":true},"supersededByPolicyId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"HrPolicyAcknowledgement":{"type":"object","required":["id","policyId","policyVersion","employeeId","acknowledgedAt"],"properties":{"id":{"type":"string","example":"ack_01HW3T..."},"policyId":{"type":"string"},"policyVersion":{"type":"integer","minimum":1},"employeeId":{"type":"string"},"acknowledgedAt":{"type":"string","format":"date-time"},"ipAddress":{"type":"string","nullable":true},"userAgent":{"type":"string","nullable":true}}},"CreateHrPolicyInput":{"type":"object","required":["slug","title","category","body","effectiveFrom"],"properties":{"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$","maxLength":120,"example":"remote-work"},"title":{"type":"string","minLength":1,"maxLength":240,"example":"Remote Work Policy"},"category":{"type":"string","minLength":1,"maxLength":80,"example":"Workplace"},"body":{"type":"string","minLength":1,"maxLength":200000},"requiresAcknowledgement":{"type":"boolean"},"effectiveFrom":{"type":"string","format":"date","example":"2026-04-01"}}},"UpdateHrPolicyInput":{"type":"object","description":"Partial update; supply at least one field. Saving bumps `version`.","properties":{"title":{"type":"string","minLength":1,"maxLength":240},"category":{"type":"string","minLength":1,"maxLength":80},"body":{"type":"string","minLength":1,"maxLength":200000},"requiresAcknowledgement":{"type":"boolean"},"effectiveFrom":{"type":"string","format":"date"}}},"SupersedeHrPolicyInput":{"type":"object","description":"Retire a policy. Pass `supersededByPolicyId` when a replacement exists; omit to sunset with no successor.","properties":{"supersededByPolicyId":{"type":"string","maxLength":64}}},"AcknowledgeHrPolicyInput":{"type":"object","description":"Optional `policyVersion` pins the read version; omitted falls back to current.","properties":{"policyVersion":{"type":"integer","minimum":1}}},"ProbationStatus":{"type":"string","enum":["PENDING","CONFIRMED","EXTENDED","TERMINATED"],"description":"Probation lifecycle. PENDING after `initiate`; CONFIRMED on `confirm`; EXTENDED on `extend`; TERMINATED on `terminate`."},"Probation":{"type":"object","required":["id","employeeId","startDate","endDate","status","createdAt","updatedAt"],"properties":{"id":{"type":"string","example":"prb_01HW3T..."},"employeeId":{"type":"string"},"startDate":{"type":"string","format":"date","example":"2026-01-15"},"endDate":{"type":"string","format":"date","example":"2026-04-15"},"status":{"$ref":"#/components/schemas/ProbationStatus"},"confirmedAt":{"type":"string","format":"date-time","nullable":true},"confirmedById":{"type":"string","nullable":true},"extendedToDate":{"type":"string","format":"date","nullable":true},"terminationReason":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"InitiateProbationInput":{"type":"object","required":["employeeId","startDate","endDate"],"properties":{"employeeId":{"type":"string","maxLength":64},"startDate":{"type":"string","format":"date","example":"2026-01-15"},"endDate":{"type":"string","format":"date","example":"2026-04-15"},"notes":{"type":"string","maxLength":2000}}},"ExtendProbationInput":{"type":"object","required":["extendedToDate"],"properties":{"extendedToDate":{"type":"string","format":"date","example":"2026-05-15"},"notes":{"type":"string","maxLength":2000}}},"TerminateProbationInput":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string","minLength":1,"maxLength":2000}}},"RoleChangeStatus":{"type":"string","enum":["PENDING","MANAGER_APPROVED","HR_APPROVED","REJECTED","APPLIED"],"description":"Two-step approval: PENDING -> MANAGER_APPROVED -> HR_APPROVED, which writes to the Employee row and stamps APPLIED."},"RoleChange":{"type":"object","required":["id","employeeId","requestedById","newJobTitle","effectiveFrom","status","createdAt","updatedAt"],"properties":{"id":{"type":"string","example":"rch_01HW3T..."},"employeeId":{"type":"string"},"requestedById":{"type":"string"},"newJobTitle":{"type":"string","maxLength":120},"newDepartmentId":{"type":"string","nullable":true},"newLocationId":{"type":"string","nullable":true},"newManagerId":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"reason":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/RoleChangeStatus"},"managerApprovedAt":{"type":"string","format":"date-time","nullable":true},"managerApprovedById":{"type":"string","nullable":true},"hrApprovedAt":{"type":"string","format":"date-time","nullable":true},"hrApprovedById":{"type":"string","nullable":true},"rejectionReason":{"type":"string","nullable":true},"appliedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"RequestRoleChangeInput":{"type":"object","required":["employeeId","newJobTitle","effectiveFrom"],"properties":{"employeeId":{"type":"string","maxLength":64},"newJobTitle":{"type":"string","minLength":1,"maxLength":120,"example":"Staff Engineer"},"newDepartmentId":{"type":"string","maxLength":64},"newLocationId":{"type":"string","maxLength":64},"newManagerId":{"type":"string","maxLength":64},"effectiveFrom":{"type":"string","format":"date","example":"2026-07-01"},"reason":{"type":"string","maxLength":2000}}},"RejectRoleChangeInput":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string","minLength":1,"maxLength":2000}}},"ExitInterviewReason":{"type":"string","enum":["VOLUNTARY","INVOLUNTARY","RELOCATION","FAMILY","COMPENSATION","CAREER_GROWTH","OTHER"]},"ExitInterviewResponseItem":{"type":"object","required":["questionId"],"properties":{"questionId":{"type":"string","maxLength":120},"rating":{"type":"integer","minimum":0,"maximum":10},"comments":{"type":"string","maxLength":2000}}},"ExitInterview":{"type":"object","required":["id","employeeId","lastWorkingDay","reason","satisfaction","wouldRecommend","responses","conductedAt","createdAt","updatedAt"],"description":"One row per employee. Captures the offboarding conversation, structured responses, satisfaction, and recommend-score.","properties":{"id":{"type":"string","example":"exi_01HW3T..."},"employeeId":{"type":"string"},"lastWorkingDay":{"type":"string","format":"date"},"reason":{"$ref":"#/components/schemas/ExitInterviewReason"},"satisfaction":{"type":"integer","minimum":1,"maximum":5},"wouldRecommend":{"type":"integer","minimum":1,"maximum":5},"responses":{"type":"array","items":{"$ref":"#/components/schemas/ExitInterviewResponseItem"}},"notes":{"type":"string","nullable":true},"conductedAt":{"type":"string","format":"date-time"},"conductedById":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"SubmitExitInterviewInput":{"type":"object","required":["employeeId","lastWorkingDay","reason","satisfaction","wouldRecommend"],"properties":{"employeeId":{"type":"string","maxLength":64},"lastWorkingDay":{"type":"string","format":"date"},"reason":{"$ref":"#/components/schemas/ExitInterviewReason"},"satisfaction":{"type":"integer","minimum":1,"maximum":5},"wouldRecommend":{"type":"integer","minimum":1,"maximum":5},"responses":{"type":"array","items":{"$ref":"#/components/schemas/ExitInterviewResponseItem"},"default":[]},"notes":{"type":"string","maxLength":4000}}},"SubmitMyExitInterviewInput":{"type":"object","required":["lastWorkingDay","reason","satisfaction","wouldRecommend"],"description":"Self-service variant. `employeeId` is derived from the session, never accepted from the client.","properties":{"lastWorkingDay":{"type":"string","format":"date"},"reason":{"$ref":"#/components/schemas/ExitInterviewReason"},"satisfaction":{"type":"integer","minimum":1,"maximum":5},"wouldRecommend":{"type":"integer","minimum":1,"maximum":5},"responses":{"type":"array","items":{"$ref":"#/components/schemas/ExitInterviewResponseItem"},"default":[]},"notes":{"type":"string","maxLength":4000}}},"HrLetterType":{"type":"string","enum":["OFFER","JOINING","INCREMENT","EXPERIENCE","RELIEVING"],"description":"Canonical letter taxonomy. Each maps to one rendering template."},"HrLetterVariables":{"type":"object","description":"Placeholder values stamped into the rendered letter body. Service fills sensible defaults from the Employee row when omitted.","properties":{"jobTitle":{"type":"string","maxLength":160},"department":{"type":"string","maxLength":160},"location":{"type":"string","maxLength":160},"reportingManager":{"type":"string","maxLength":160},"startDate":{"type":"string","maxLength":40},"joiningDate":{"type":"string","maxLength":40},"lastWorkingDay":{"type":"string","maxLength":40},"effectiveDate":{"type":"string","maxLength":40},"employeeNumber":{"type":"string","maxLength":60},"annualCtc":{"type":"number","minimum":0},"monthlyCtc":{"type":"number","minimum":0},"oldAnnualCtc":{"type":"number","minimum":0},"newAnnualCtc":{"type":"number","minimum":0},"currency":{"type":"string","maxLength":8,"example":"INR"},"designations":{"type":"array","items":{"type":"string","maxLength":160},"maxItems":20},"reason":{"type":"string","maxLength":600},"terms":{"type":"array","items":{"type":"string","maxLength":400},"maxItems":20},"companyName":{"type":"string","maxLength":240},"companyAddress":{"type":"string","maxLength":400}}},"HrLetter":{"type":"object","required":["id","employeeId","type","generatedAt","revoked"],"properties":{"id":{"type":"string","example":"hrl_01HW3T..."},"employeeId":{"type":"string"},"type":{"$ref":"#/components/schemas/HrLetterType"},"generatedAt":{"type":"string","format":"date-time"},"generatedById":{"type":"string","nullable":true},"revoked":{"type":"boolean"},"variables":{"$ref":"#/components/schemas/HrLetterVariables"}}},"GenerateHrLetterInput":{"type":"object","required":["employeeId","type"],"properties":{"employeeId":{"type":"string","maxLength":64},"type":{"$ref":"#/components/schemas/HrLetterType"},"variables":{"$ref":"#/components/schemas/HrLetterVariables"}}},"HrHeadcountSnapshot":{"type":"object","required":["total","asOf"],"description":"Current employee headcount snapshot, optionally split by department/location.","properties":{"total":{"type":"integer","minimum":0,"example":142},"asOf":{"type":"string","format":"date-time"},"byDepartment":{"type":"array","items":{"type":"object","required":["departmentId","count"],"properties":{"departmentId":{"type":"string"},"departmentName":{"type":"string"},"count":{"type":"integer","minimum":0}}}},"byLocation":{"type":"array","items":{"type":"object","required":["locationId","count"],"properties":{"locationId":{"type":"string"},"locationName":{"type":"string"},"count":{"type":"integer","minimum":0}}}}}},"HrHeadcountTimeseries":{"type":"object","required":["points"],"properties":{"points":{"type":"array","items":{"type":"object","required":["month","count"],"properties":{"month":{"type":"string","example":"2026-01"},"count":{"type":"integer","minimum":0}}}}}},"HrTurnoverReport":{"type":"object","required":["fromDate","toDate","rate"],"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"rate":{"type":"number","minimum":0,"description":"Decimal fraction (0.12 = 12%)."},"terminations":{"type":"integer","minimum":0},"averageHeadcount":{"type":"number","minimum":0}}},"HrLeaveUtilizationReport":{"type":"object","required":["year","rows"],"properties":{"year":{"type":"integer","minimum":2000,"maximum":2100},"rows":{"type":"array","items":{"type":"object","required":["leaveType","allocated","used"],"properties":{"leaveType":{"type":"string"},"allocated":{"type":"number","minimum":0},"used":{"type":"number","minimum":0},"utilizationRate":{"type":"number","minimum":0,"description":"used / allocated; 0 when allocated = 0."}}}}}},"CustomRecurrenceRule":{"type":"object","required":["freq","interval"],"description":"RRULE-style recurrence persisted on `Task.recurrenceRule`. When supplied, takes precedence over the coarse `recurrence` enum.","properties":{"freq":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","YEARLY"]},"interval":{"type":"integer","minimum":1,"maximum":999},"byWeekday":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"maxItems":7},"byMonthDay":{"type":"integer","minimum":1,"maximum":31},"endType":{"type":"string","enum":["NEVER","UNTIL","COUNT"]},"endUntil":{"type":"string","format":"date-time"},"endCount":{"type":"integer","minimum":1,"maximum":10000},"occurrencesCompleted":{"type":"integer","minimum":0}}},"TaskReminderInput":{"type":"object","required":["remindAt"],"properties":{"remindAt":{"type":"string","format":"date-time"},"offsetMinutes":{"type":"integer","minimum":0,"maximum":525600}}},"UpdateTaskInput":{"type":"object","description":"Body for `PATCH /v1/tasks/{id}`. All fields optional, but at least one mutable field is required (in addition to `version` / `expectedVersion`). Optimistic concurrency: pass `If-Match: <version>` header OR `expectedVersion` in the body; if both are present they MUST agree.","minProperties":1,"properties":{"title":{"type":"string","minLength":1,"maxLength":400},"description":{"type":"string","maxLength":20000,"nullable":true},"visibility":{"type":"string","enum":["SHARED","PRIVATE"]},"recurrence":{"type":"string","enum":["NONE","DAILY","WEEKLY","MONTHLY"]},"recurrenceRule":{"allOf":[{"$ref":"#/components/schemas/CustomRecurrenceRule"}],"nullable":true},"priority":{"type":"string","enum":["NONE","LOW","MEDIUM","HIGH","URGENT"]},"status":{"type":"string","minLength":1,"maxLength":48},"startsOn":{"type":"string","format":"date-time","nullable":true},"dueOn":{"type":"string","format":"date-time","nullable":true},"remindAt":{"type":"string","format":"date-time","nullable":true},"reminders":{"type":"array","items":{"$ref":"#/components/schemas/TaskReminderInput"},"maxItems":20,"nullable":true},"snoozedUntil":{"type":"string","format":"date-time","nullable":true},"estimateMin":{"type":"integer","minimum":0,"maximum":100000,"nullable":true},"parentId":{"type":"string","nullable":true},"assigneeId":{"type":"string","nullable":true},"customAttributes":{"type":"object","additionalProperties":true},"typeId":{"type":"string"},"statusId":{"type":"string"},"workflowId":{"type":"string"},"fields":{"type":"object","description":"Typed custom-field values keyed by field key (`^[a-z][a-z0-9_]{1,38}$`).","additionalProperties":true},"clearFields":{"type":"array","items":{"type":"string"},"maxItems":50},"version":{"type":"integer","minimum":0},"expectedVersion":{"type":"integer","minimum":0}}},"PerformTransitionInput":{"type":"object","required":["transitionId"],"description":"Body for `POST /v1/tasks/{id}/transition`. Runs a workflow transition - validates the workflow allows it from the current status, runs any pre/post conditions, then atomically updates the task.","properties":{"transitionId":{"type":"string"},"comment":{"type":"string","maxLength":4000},"fields":{"type":"object","additionalProperties":true},"expectedVersion":{"type":"integer","minimum":0}}},"SnoozeTaskInput":{"type":"object","required":["until"],"description":"Body for `POST /v1/tasks/{id}/snooze`. Pass `null` to clear the snooze.","properties":{"until":{"type":"string","format":"date-time","nullable":true}}},"RecurringPreviewRule":{"type":"object","required":["freq"],"properties":{"freq":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","YEARLY"]},"interval":{"type":"integer","minimum":1,"maximum":9999},"byWeekday":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"byMonthDay":{"type":"integer","minimum":1,"maximum":31},"count":{"type":"integer","minimum":1,"maximum":1000},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"RecurringPreviewInput":{"type":"object","required":["dtstart","from","to","rule"],"description":"Body for `POST /v1/tasks/recurring-preview`. Expands an RRULE between `from` and `to` without persisting anything.","properties":{"dtstart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-06-01"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-06-01"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-06-30"},"rule":{"$ref":"#/components/schemas/RecurringPreviewRule"}}},"RecurringPreviewResponse":{"type":"object","required":["occurrences"],"properties":{"occurrences":{"type":"array","description":"ISO date strings (YYYY-MM-DD) for each generated occurrence inside the window.","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}}},"ImportTaskRow":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":400},"description":{"type":"string","maxLength":20000},"status":{"type":"string","minLength":1,"maxLength":48},"priority":{"type":"string","enum":["NONE","LOW","MEDIUM","HIGH","URGENT"]},"recurrence":{"type":"string","enum":["NONE","DAILY","WEEKLY","MONTHLY"]},"visibility":{"type":"string","enum":["SHARED","PRIVATE"]},"startsOn":{"type":"string","format":"date-time"},"dueOn":{"type":"string","format":"date-time"},"remindAt":{"type":"string","format":"date-time"},"estimateMin":{"type":"integer","minimum":0,"maximum":100000},"labelIds":{"type":"array","items":{"type":"string"},"maxItems":50}}},"ImportTasksInput":{"type":"object","required":["projectId","tasks"],"description":"Body for `POST /v1/tasks/import`. Atomically validates each row independently; valid rows are created, invalid rows are returned with per-row errors.","properties":{"projectId":{"type":"string"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/ImportTaskRow"},"minItems":1,"maxItems":500}}},"ImportTasksResponse":{"type":"object","required":["created","errors"],"properties":{"created":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"errors":{"type":"array","items":{"type":"object","required":["index","message"],"properties":{"index":{"type":"integer","minimum":0},"message":{"type":"string"}}}}}},"AutoScheduleInput":{"type":"object","description":"Body for `POST /v1/tasks/auto-schedule`. `dryRun: true` (default) returns proposals without mutating; `false` applies them.","properties":{"dryRun":{"type":"boolean","default":true},"horizonDays":{"type":"integer","minimum":1,"maximum":30,"default":7},"taskIds":{"type":"array","items":{"type":"string"},"maxItems":200}}},"AutoScheduleProposal":{"type":"object","required":["taskId","version","proposedStartsOn","proposedEndsOn"],"properties":{"taskId":{"type":"string"},"version":{"type":"integer","minimum":0},"previousStartsOn":{"type":"string","format":"date-time","nullable":true},"previousDueOn":{"type":"string","format":"date-time","nullable":true},"proposedStartsOn":{"type":"string","format":"date-time"},"proposedEndsOn":{"type":"string","format":"date-time"},"reason":{"type":"string"}}},"AutoScheduleResponse":{"type":"object","required":["proposals","appliedCount"],"properties":{"proposals":{"type":"array","items":{"$ref":"#/components/schemas/AutoScheduleProposal"}},"appliedCount":{"type":"integer","minimum":0,"description":"0 when `dryRun=true`; equals proposals.length when applied."},"warnings":{"type":"array","items":{"type":"string"}}}},"BoardColumn":{"type":"object","required":["statusId","name","tasks"],"properties":{"statusId":{"type":"string"},"name":{"type":"string"},"order":{"type":"integer","minimum":0},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"totalCount":{"type":"integer","minimum":0},"hasMore":{"type":"boolean"}}},"BoardViewResponse":{"type":"object","required":["boardId","columns"],"description":"Response for `GET /v1/tasks/board`. Each column carries up to `limitPerColumn` tasks; clients can paginate per-column.","properties":{"boardId":{"type":"string"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/BoardColumn"}}}},"TaskLabelLink":{"type":"object","required":["taskId","labelId"],"properties":{"taskId":{"type":"string"},"labelId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"TaskReminderRow":{"type":"object","required":["id","taskId","remindAt"],"properties":{"id":{"type":"string"},"taskId":{"type":"string"},"remindAt":{"type":"string","format":"date-time"},"offsetMinutes":{"type":"integer","minimum":0,"nullable":true},"firedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"TaskTemplate":{"type":"object","required":["id","name","projectId","createdAt"],"description":"A saved task template. Apply via `POST /v1/task-templates/{id}/apply` to materialise it as a real task.","properties":{"id":{"type":"string","example":"ttpl_01HW3T..."},"name":{"type":"string","minLength":1,"maxLength":200},"projectId":{"type":"string"},"description":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":true,"description":"Saved task fields (title, priority, defaults)."},"createdAt":{"type":"string","format":"date-time"}}},"CreateTaskTemplateInput":{"type":"object","required":["projectId","name","payload"],"properties":{"projectId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"payload":{"type":"object","additionalProperties":true}}},"ApplyTaskTemplateInput":{"type":"object","required":["projectId"],"description":"Body for `POST /v1/task-templates/{id}/apply`. Optional `overrides` patch the saved payload before create.","properties":{"projectId":{"type":"string"},"overrides":{"$ref":"#/components/schemas/UpdateTaskInput"}}},"ProjectStatus":{"type":"string","enum":["PLANNED","ACTIVE","PAUSED","DONE","CANCELLED"],"description":"Project lifecycle. Allowed transitions: PLANNED -> {ACTIVE,CANCELLED}; ACTIVE -> {PAUSED,DONE,CANCELLED}; PAUSED -> {ACTIVE,CANCELLED}; DONE/CANCELLED terminal."},"Project":{"type":"object","required":["id","tenantId","teamId","name","status","version","createdAt"],"description":"Canonical project shape returned by every read endpoint.","properties":{"id":{"type":"string","example":"prj_01HW3T..."},"tenantId":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":240},"status":{"$ref":"#/components/schemas/ProjectStatus"},"ownerId":{"type":"string","nullable":true},"version":{"type":"integer","minimum":0},"startsOn":{"type":"string","format":"date-time","nullable":true},"endsOn":{"type":"string","format":"date-time","nullable":true},"archivedAt":{"type":"string","format":"date-time","nullable":true},"customAttributes":{"type":"object","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateProjectInput":{"type":"object","required":["teamId","name"],"description":"Body for `POST /v1/projects`. Status defaults to `PLANNED`; owner defaults to the caller.","properties":{"teamId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":240},"status":{"$ref":"#/components/schemas/ProjectStatus"},"ownerId":{"type":"string"},"startsOn":{"type":"string","format":"date-time"},"endsOn":{"type":"string","format":"date-time"},"labelIds":{"type":"array","items":{"type":"string"},"maxItems":50},"customAttributes":{"type":"object","additionalProperties":true}}},"UpdateProjectInput":{"type":"object","description":"Body for `PATCH /v1/projects/{id}`. All fields optional; at least one mutable field required.","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":240},"teamId":{"type":"string"},"status":{"$ref":"#/components/schemas/ProjectStatus"},"ownerId":{"type":"string","nullable":true},"startsOn":{"type":"string","format":"date-time","nullable":true},"endsOn":{"type":"string","format":"date-time","nullable":true},"labelIds":{"type":"array","items":{"type":"string"},"maxItems":50},"customAttributes":{"type":"object","additionalProperties":true},"version":{"type":"integer","minimum":0}}},"TransferProjectInput":{"type":"object","required":["newOwnerId"],"properties":{"newOwnerId":{"type":"string"}}},"ProjectListResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"nextCursor":{"type":"string","nullable":true}}},"ProjectSummaryCounts":{"type":"object","required":["projectId","totalTasks","doneTasks","inProgressTasks","overdueTasks"],"description":"Aggregate task counters surfaced on the project landing page.","properties":{"projectId":{"type":"string"},"totalTasks":{"type":"integer","minimum":0},"doneTasks":{"type":"integer","minimum":0},"inProgressTasks":{"type":"integer","minimum":0},"overdueTasks":{"type":"integer","minimum":0},"progressPct":{"type":"integer","minimum":0,"maximum":100}}},"MilestoneStatus":{"type":"string","enum":["PENDING","IN_PROGRESS","DONE","AT_RISK","SLIPPED"]},"ProjectMilestone":{"type":"object","required":["id","projectId","name","status","createdAt"],"properties":{"id":{"type":"string","example":"mil_01HW3T..."},"projectId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":240},"description":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/MilestoneStatus"},"dueOn":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"order":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateProjectMilestoneInput":{"type":"object","required":["projectId","name"],"properties":{"projectId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":240},"description":{"type":"string","maxLength":4000},"dueOn":{"type":"string","format":"date-time"},"status":{"$ref":"#/components/schemas/MilestoneStatus"},"order":{"type":"integer","minimum":0}}},"UpdateProjectMilestoneInput":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":240},"description":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/MilestoneStatus"},"dueOn":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"order":{"type":"integer","minimum":0}}},"ProjectBaseline":{"type":"object","required":["id","projectId","name","capturedAt"],"description":"A snapshot of the project at a point in time. Used to compute slippage deltas (planned vs. current dueOn for each task).","properties":{"id":{"type":"string","example":"bsl_01HW3T..."},"projectId":{"type":"string"},"name":{"type":"string","maxLength":200},"description":{"type":"string","nullable":true},"capturedAt":{"type":"string","format":"date-time"},"capturedById":{"type":"string","nullable":true},"taskCount":{"type":"integer","minimum":0}}},"CreateProjectBaselineInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000}}},"ProjectBaselineDeltaRow":{"type":"object","required":["taskId","title"],"properties":{"taskId":{"type":"string"},"title":{"type":"string"},"baselineDueOn":{"type":"string","format":"date-time","nullable":true},"currentDueOn":{"type":"string","format":"date-time","nullable":true},"slippedDays":{"type":"integer"},"status":{"type":"string"}}},"ProjectBaselineDelta":{"type":"object","required":["baselineId","rows"],"properties":{"baselineId":{"type":"string"},"capturedAt":{"type":"string","format":"date-time"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/ProjectBaselineDeltaRow"}},"summary":{"type":"object","properties":{"onTimeCount":{"type":"integer","minimum":0},"slippedCount":{"type":"integer","minimum":0},"addedCount":{"type":"integer","minimum":0},"removedCount":{"type":"integer","minimum":0}}}}},"ProjectTemplate":{"type":"object","required":["id","name","createdAt"],"properties":{"id":{"type":"string","example":"ptpl_01HW3T..."},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true},"isStarter":{"type":"boolean","description":"True for system-shipped starter templates."},"payload":{"type":"object","additionalProperties":true,"description":"Saved project + tasks + milestones snapshot."},"createdAt":{"type":"string","format":"date-time"}}},"SaveProjectAsTemplateInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000}}},"ProjectFromTemplateInput":{"type":"object","required":["templateId","teamId","name"],"properties":{"templateId":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":240},"startsOn":{"type":"string","format":"date-time"},"ownerId":{"type":"string"}}},"Workflow":{"type":"object","required":["id","projectId","key","name","version","createdAt"],"description":"Status workflow for a project. `key` is the project-unique slug (lowercase, snake-case). `version` is the optimistic-concurrency cursor.","properties":{"id":{"type":"string","example":"wfl_01HW3T..."},"projectId":{"type":"string"},"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,38}$","example":"support_ticket"},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","nullable":true,"maxLength":2000},"isPersonal":{"type":"boolean"},"version":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateWorkflowInput":{"type":"object","required":["key","name"],"properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,38}$"},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":2000},"isPersonal":{"type":"boolean"}}},"UpdateWorkflowInput":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":2000,"nullable":true},"isPersonal":{"type":"boolean"},"expectedVersion":{"type":"integer","minimum":0}}},"WorkflowStatusAssignment":{"type":"object","required":["statusId","isInitial","orderInWorkflow"],"properties":{"statusId":{"type":"string"},"isInitial":{"type":"boolean"},"orderInWorkflow":{"type":"integer","minimum":0,"maximum":9999}}},"SetWorkflowStatusesInput":{"type":"object","required":["assignments"],"description":"Atomic bulk replace. Exactly one assignment must have `isInitial: true`.","properties":{"assignments":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowStatusAssignment"},"minItems":1,"maxItems":40}}},"WorkflowRun":{"type":"object","required":["id","workflowId","status","startedAt"],"description":"A single workflow execution row. `status` mirrors agent-run lifecycle.","properties":{"id":{"type":"string","example":"wfr_01HW3T..."},"workflowId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"]},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true},"triggeredById":{"type":"string","nullable":true},"contextSummary":{"type":"string","nullable":true}}},"WorkflowStep":{"type":"object","required":["id","runId","index","kind","status"],"properties":{"id":{"type":"string"},"runId":{"type":"string"},"index":{"type":"integer","minimum":0},"kind":{"type":"string","description":"Tool / action invoked at this step."},"status":{"type":"string","enum":["queued","running","completed","failed","skipped"]},"input":{"type":"object","additionalProperties":true,"nullable":true},"output":{"type":"object","additionalProperties":true,"nullable":true},"errorMessage":{"type":"string","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true}}},"AgentRunStatus":{"type":"string","enum":["queued","running","completed","failed","approval-needed","max-steps-exceeded"]},"AgentApprovalStatus":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]},"AgentApprovalSource":{"type":"string","enum":["agent_planner","governed_template","system_replay_drill"]},"AgentApproval":{"type":"object","required":["id","agentId","source","actionKind","summary","status","createdAt"],"description":"A single human-in-the-loop approval. `replayable` indicates whether the original action is still reproducible from the captured envelope.","properties":{"id":{"type":"string","example":"apv_01HW3T..."},"agentId":{"type":"string"},"runId":{"type":"string","nullable":true},"source":{"$ref":"#/components/schemas/AgentApprovalSource"},"actionKind":{"type":"string","maxLength":80},"summary":{"type":"string","maxLength":500},"payload":{"type":"object","additionalProperties":true},"status":{"$ref":"#/components/schemas/AgentApprovalStatus"},"decidedAt":{"type":"string","format":"date-time","nullable":true},"decidedById":{"type":"string","nullable":true},"decisionNote":{"type":"string","nullable":true},"replayable":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"CreateAgentApprovalInput":{"type":"object","required":["agentId","source","actionKind","summary"],"properties":{"agentId":{"type":"string","minLength":1,"maxLength":64},"runId":{"type":"string","minLength":1,"maxLength":64},"source":{"$ref":"#/components/schemas/AgentApprovalSource"},"actionKind":{"type":"string","minLength":1,"maxLength":80},"summary":{"type":"string","minLength":1,"maxLength":500},"payload":{"type":"object","additionalProperties":true,"default":{}}}},"DecideAgentApprovalInput":{"type":"object","required":["approve"],"properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":2000}}},"ReplayAgentApprovalInput":{"type":"object","description":"Body for `POST /v1/agents/approvals/{id}/replay`. All fields optional.","properties":{"runId":{"type":"string","minLength":1,"maxLength":64},"reason":{"type":"string","maxLength":500}}},"AgentRun":{"type":"object","required":["id","agentId","status","startedAt"],"properties":{"id":{"type":"string","example":"agr_01HW3T..."},"agentId":{"type":"string"},"templateId":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true},"totalCostUsd":{"type":"number","minimum":0,"nullable":true},"totalSteps":{"type":"integer","minimum":0},"summary":{"type":"string","nullable":true}}},"AgentTemplate":{"type":"object","required":["id","name","createdAt"],"properties":{"id":{"type":"string","example":"agt_01HW3T..."},"name":{"type":"string"},"description":{"type":"string","nullable":true},"disabled":{"type":"boolean","description":"When true, governance has paused the template."},"costCapUsd":{"type":"number","minimum":0,"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"UpdateAgentTemplateGovernanceInput":{"type":"object","required":["reason"],"description":"Body for `PATCH /v1/agents/templates/{id}`. `reason` is mandatory and captured in the audit log.","properties":{"disabled":{"type":"boolean"},"costCapUsd":{"type":"number","minimum":0,"maximum":10000},"reason":{"type":"string","minLength":3,"maxLength":500}}},"RunAgentTemplateInput":{"type":"object","description":"Body for `POST /v1/agents/templates/{id}/run`. Free-form context object passed to the template prompt.","properties":{"context":{"type":"object","additionalProperties":true},"dryRun":{"type":"boolean","default":false}}},"AgentMemoryScope":{"type":"string","enum":["tenant","agent","user"]},"AgentMemoryEntry":{"type":"object","required":["id","key","value","scope","createdAt"],"properties":{"id":{"type":"string","example":"mem_01HW3T..."},"key":{"type":"string","minLength":1,"maxLength":200},"value":{"type":"object","additionalProperties":true},"scope":{"$ref":"#/components/schemas/AgentMemoryScope"},"agentId":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"CreateAgentMemoryInput":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","minLength":1,"maxLength":200},"value":{"type":"object","additionalProperties":true},"scope":{"$ref":"#/components/schemas/AgentMemoryScope"},"agentId":{"type":"string","maxLength":64,"nullable":true},"userId":{"type":"string","maxLength":64,"nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true}}},"AgentActivityRow":{"type":"object","required":["id","agentId","status","at"],"description":"A combined activity feed row across runs/approvals/governance edits.","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"kind":{"type":"string","description":"run | approval | governance."},"status":{"type":"string"},"summary":{"type":"string"},"at":{"type":"string","format":"date-time"}}},"AgentReplayEnvelope":{"type":"object","required":["approvalId","replayHash"],"description":"Deterministic replay envelope captured at approval time so the original action can be re-executed verbatim.","properties":{"approvalId":{"type":"string"},"replayHash":{"type":"string","description":"SHA-256 of the canonical envelope bytes."},"toolName":{"type":"string"},"toolInput":{"type":"object","additionalProperties":true},"capturedAt":{"type":"string","format":"date-time"}}},"NlCaptureRequest":{"type":"object","required":["prompt","projectId"],"description":"Body for `POST /v1/ai/nl-capture`. Natural-language prompt; the server returns a structured task draft.","properties":{"prompt":{"type":"string","minLength":1,"maxLength":2000},"projectId":{"type":"string"}}},"NlCaptureDraftTask":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":400},"description":{"type":"string"},"priority":{"type":"string","enum":["NONE","LOW","MEDIUM","HIGH","URGENT"]},"dueOn":{"type":"string","format":"date-time"},"startsOn":{"type":"string","format":"date-time"},"estimateMin":{"type":"integer","minimum":0},"assigneeId":{"type":"string"},"labelIds":{"type":"array","items":{"type":"string"}}}},"NlCaptureResponse":{"type":"object","required":["draft"],"description":"Structured draft. The client typically lets the user review and confirm before importing via `POST /v1/tasks`.","properties":{"draft":{"type":"object","required":["tasks"],"properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/NlCaptureDraftTask"}},"clarifyingQuestion":{"type":"string","nullable":true}}},"modelUsed":{"type":"string"},"costUsd":{"type":"number","minimum":0}}},"RecordCaptureHistoryInput":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","minLength":1,"maxLength":20000},"draft":{"type":"object","additionalProperties":true},"importedCount":{"type":"integer","minimum":0,"maximum":1000}}},"CaptureHistoryRow":{"type":"object","required":["id","prompt","createdAt"],"properties":{"id":{"type":"string"},"prompt":{"type":"string"},"draft":{"type":"object","additionalProperties":true,"nullable":true},"importedCount":{"type":"integer","minimum":0,"nullable":true},"importedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"AskAtlasInput":{"type":"object","required":["prompt"],"description":"Body for `POST /v1/ai/ask`. Sends a natural-language question; the server retrieves context, calls the LLM, and returns a cited answer.","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"projectId":{"type":"string"},"taskId":{"type":"string"},"conversationId":{"type":"string"}}},"AskAtlasResponse":{"type":"object","required":["answer"],"properties":{"answer":{"type":"string"},"citations":{"type":"array","items":{"type":"object","required":["kind","id"],"properties":{"kind":{"type":"string","enum":["task","project","comment","doc"]},"id":{"type":"string"},"title":{"type":"string"},"snippet":{"type":"string"}}}},"conversationId":{"type":"string"},"modelUsed":{"type":"string"},"costUsd":{"type":"number","minimum":0}}},"AgenticPlannerToolAdmission":{"type":"object","required":["toolName","allowed"],"description":"A single tool-admission decision from the agentic planner. Captured for replay + audit; `reason` carries the LLM justification.","properties":{"toolName":{"type":"string"},"allowed":{"type":"boolean"},"reason":{"type":"string"},"riskLevel":{"type":"string","enum":["low","medium","high"]},"requiresApproval":{"type":"boolean"}}},"AgenticPlannerStep":{"type":"object","required":["index","toolName","status"],"properties":{"index":{"type":"integer","minimum":0},"toolName":{"type":"string"},"admission":{"$ref":"#/components/schemas/AgenticPlannerToolAdmission"},"status":{"type":"string","enum":["planned","executing","awaiting-approval","completed","failed","skipped"]},"input":{"type":"object","additionalProperties":true},"output":{"type":"object","additionalProperties":true,"nullable":true}}},"AgenticPlannerRun":{"type":"object","required":["id","status","steps","createdAt"],"properties":{"id":{"type":"string","example":"apr_01HW3T..."},"status":{"type":"string","enum":["planning","executing","awaiting-approval","completed","failed","cancelled"]},"objective":{"type":"string"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/AgenticPlannerStep"}},"totalCostUsd":{"type":"number","minimum":0},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true}}},"StandupRunInput":{"type":"object","description":"Body for `POST /v1/ai/standup/run`. Generates a per-user standup digest from yesterday's activity and today's plan.","properties":{"userId":{"type":"string"},"windowHours":{"type":"integer","minimum":1,"maximum":168,"default":24}}},"StandupRunResponse":{"type":"object","required":["summary"],"properties":{"summary":{"type":"string"},"yesterday":{"type":"array","items":{"type":"string"}},"today":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"string"}},"modelUsed":{"type":"string"}}},"MarketplaceAppCatalogEntry":{"type":"object","required":["id","slug","name","vendor","description","iconUrl","category","scopes","homepageUrl"],"properties":{"id":{"type":"string","example":"slack"},"slug":{"type":"string","example":"slack"},"name":{"type":"string","example":"Slack"},"vendor":{"type":"string","example":"Slack Technologies"},"description":{"type":"string"},"iconUrl":{"type":"string","format":"uri"},"category":{"type":"string","enum":["communication","developer-tools","productivity","analytics","finance","automation","other"]},"scopes":{"type":"array","items":{"type":"string"}},"homepageUrl":{"type":"string","format":"uri"}}},"MarketplaceInstallRow":{"type":"object","required":["installId","appId","installedAt"],"properties":{"installId":{"type":"string"},"appId":{"type":"string"},"installedAt":{"type":"string","format":"date-time"},"installedBy":{"type":"string","nullable":true}}},"MarketplaceInstallRequest":{"type":"object","required":["appId"],"properties":{"appId":{"type":"string","minLength":1,"example":"slack"},"scopesGranted":{"type":"array","items":{"type":"string"},"description":"Optional. When provided the install is recorded with the supplied scope grants (scoped install flow)."}}},"MarketplaceInstallResponse":{"type":"object","required":["installId","appId","status","installedAt"],"properties":{"installId":{"type":"string"},"appId":{"type":"string"},"status":{"type":"string","enum":["installed"]},"installedAt":{"type":"string","format":"date-time"},"oauthClientId":{"type":"string"},"scopesGranted":{"type":"array","items":{"type":"string"}}}},"MarketplacePublishStatus":{"type":"string","enum":["draft","submitted","in_review","published","rejected","suspended"]},"MarketplaceSubmissionStatus":{"type":"string","enum":["pending","in_review","approved","changes_requested","rejected"]},"MarketplaceAppRow":{"type":"object","required":["id","slug","name","vendor","manifestVersion","publishStatus","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"vendor":{"type":"string"},"vendorTenantId":{"type":"string","nullable":true},"description":{"type":"string"},"iconUrl":{"type":"string","nullable":true},"category":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"homepageUrl":{"type":"string","nullable":true},"manifestVersion":{"type":"string"},"manifest":{"type":"object","additionalProperties":true},"publishStatus":{"$ref":"#/components/schemas/MarketplacePublishStatus"},"submittedAt":{"type":"string","format":"date-time","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"reviewedBy":{"type":"string","nullable":true},"reviewNotes":{"type":"string","nullable":true},"rejectionReason":{"type":"string","nullable":true},"revenueShareBps":{"type":"integer","minimum":0,"maximum":10000},"monthlyPriceCents":{"type":"integer","nullable":true},"freeForN":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"MarketplaceSubmissionRow":{"type":"object","required":["id","appId","status","submittedBy","submittedAt"],"properties":{"id":{"type":"string"},"appId":{"type":"string"},"manifestSnapshot":{"type":"object","additionalProperties":true},"status":{"$ref":"#/components/schemas/MarketplaceSubmissionStatus"},"submittedBy":{"type":"string"},"submittedAt":{"type":"string","format":"date-time"},"reviewedBy":{"type":"string","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"reviewerNotes":{"type":"string","nullable":true}}},"MarketplaceQueueResponse":{"type":"object","required":["items","total","page","pageSize"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceAppRow"}},"total":{"type":"integer"},"page":{"type":"integer"},"pageSize":{"type":"integer"}}},"MarketplaceRevenueRow":{"type":"object","required":["id","appId","tenantId","installId","periodMonth","grossCents","shareBps","payoutCents","status","createdAt"],"properties":{"id":{"type":"string"},"appId":{"type":"string"},"tenantId":{"type":"string"},"installId":{"type":"string"},"periodMonth":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2026-06"},"grossCents":{"type":"integer"},"shareBps":{"type":"integer"},"payoutCents":{"type":"integer"},"status":{"type":"string","enum":["accrued","paid","reversed"]},"createdAt":{"type":"string","format":"date-time"}}},"MarketplaceReviewNotesInput":{"type":"object","properties":{"reviewerNotes":{"type":"string","maxLength":4000}}},"MarketplaceReasonInput":{"type":"object","properties":{"reason":{"type":"string","maxLength":4000}}},"MarketplaceSubmitDraftInput":{"type":"object","required":["manifest"],"properties":{"manifest":{"type":"object","additionalProperties":true,"description":"App manifest v2 JSON."}}},"MarketplaceSubmitDraftResponse":{"type":"object","required":["appId","submissionId"],"properties":{"appId":{"type":"string"},"submissionId":{"type":"string"}}},"MarketplaceUpdateManifestInput":{"type":"object","required":["manifest"],"properties":{"manifest":{"type":"object","additionalProperties":true}}},"MarketplaceRevenueSummary":{"type":"object","required":["totalRevenueCents","mrr","arr","top10Tenants","trend30d"],"properties":{"totalRevenueCents":{"type":"integer"},"mrr":{"type":"integer","description":"Monthly recurring revenue in cents (current calendar month)."},"arr":{"type":"integer","description":"Annual recurring revenue (MRR x 12)."},"top10Tenants":{"type":"array","items":{"type":"object","required":["tenantId","displayName","totalCents","lastInvoiceAt"],"properties":{"tenantId":{"type":"string"},"displayName":{"type":"string"},"totalCents":{"type":"integer"},"lastInvoiceAt":{"type":"string","format":"date-time"}}}},"trend30d":{"type":"array","description":"30 contiguous daily buckets ending today, oldest first.","items":{"type":"object","required":["day","revenueCents"],"properties":{"day":{"type":"string","example":"2026-06-01"},"revenueCents":{"type":"integer"}}}}}},"MarketplaceDashboardSummary":{"type":"object","required":["installsByConnector","topUsage","failedAuths24h"],"properties":{"installsByConnector":{"type":"array","items":{"type":"object","required":["name","totalInstalls","last30dInstalls","activeTenants"],"properties":{"name":{"type":"string"},"totalInstalls":{"type":"integer"},"last30dInstalls":{"type":"integer"},"activeTenants":{"type":"integer"}}}},"topUsage":{"type":"array","items":{"type":"object","required":["connector","eventsLast24h","eventsLast7d"],"properties":{"connector":{"type":"string"},"eventsLast24h":{"type":"integer"},"eventsLast7d":{"type":"integer"}}}},"failedAuths24h":{"type":"array","items":{"type":"object","required":["connector","count","sample_error"],"properties":{"connector":{"type":"string"},"count":{"type":"integer"},"sample_error":{"type":"string"}}}}}},"AnomalyAlertSeverity":{"type":"string","enum":["info","warning","critical"]},"AnomalyAlertStatus":{"type":"string","enum":["open","acknowledged","resolved"]},"AnomalyAlert":{"type":"object","required":["id","signal","severity","status","zScore","observedValue","baselineMean","baselineStdDev","baselineWindowDays","suggestedAction","detectedAt"],"properties":{"id":{"type":"string","example":"anom_01HW3T2K8X9Y2VPRZGQX9NDY1F"},"tenantId":{"type":"string","nullable":true},"signal":{"type":"string","example":"auth.failures.spike"},"severity":{"$ref":"#/components/schemas/AnomalyAlertSeverity"},"status":{"$ref":"#/components/schemas/AnomalyAlertStatus"},"zScore":{"type":"number"},"observedValue":{"type":"number"},"baselineMean":{"type":"number"},"baselineStdDev":{"type":"number"},"baselineWindowDays":{"type":"integer"},"suggestedAction":{"type":"string"},"context":{"type":"object","nullable":true,"additionalProperties":true},"detectedAt":{"type":"string","format":"date-time"},"acknowledgedAt":{"type":"string","format":"date-time","nullable":true},"acknowledgedBy":{"type":"string","nullable":true},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"resolvedBy":{"type":"string","nullable":true}}},"AnomalyListResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AnomalyAlert"}}}},"AnomalyAckInput":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}}},"AnomalyResolveInput":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}}},"AuditMirrorRunStatus":{"type":"string","enum":["running","succeeded","failed","skipped"]},"AuditMirrorStatusResponse":{"type":"object","required":["ok","bucket","retentionSeconds","lastSucceededAt","lagSeconds","lastRunAt","lastRunStatus","failingTenantCount","recent"],"properties":{"ok":{"type":"boolean"},"bucket":{"type":"string","nullable":true},"retentionSeconds":{"type":"integer"},"lastSucceededAt":{"type":"string","format":"date-time","nullable":true},"lagSeconds":{"type":"integer","nullable":true},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"lastRunStatus":{"oneOf":[{"$ref":"#/components/schemas/AuditMirrorRunStatus"},{"type":"null"}]},"failingTenantCount":{"type":"integer"},"recent":{"type":"array","items":{"type":"object","required":["id","tenantId","status","startedAt","finishedAt","eventCount","objectKey","errorMessage"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"status":{"$ref":"#/components/schemas/AuditMirrorRunStatus"},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time","nullable":true},"eventCount":{"type":"integer"},"objectKey":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true}}}}}},"AuditMirrorReplayResponse":{"type":"object","required":["tenantId","status","eventCount"],"properties":{"tenantId":{"type":"string"},"status":{"$ref":"#/components/schemas/AuditMirrorRunStatus"},"eventCount":{"type":"integer"},"objectKey":{"type":"string"},"sha256":{"type":"string","description":"Lowercase hex SHA-256 of the uploaded gzipped object."}}},"ComplianceControlView":{"type":"object","required":["id","framework","reference","title","description","category","active"],"properties":{"id":{"type":"string"},"framework":{"type":"string","enum":["SOC2","ISO27001","HIPAA","GDPR"]},"reference":{"type":"string","example":"CC6.1"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"active":{"type":"boolean"}}},"ComplianceControlsResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceControlView"}}}},"ComplianceEvidenceView":{"type":"object","required":["id","controlId","collectedAt","passing","collectedBy","expiresAt"],"properties":{"id":{"type":"string"},"controlId":{"type":"string"},"collectedAt":{"type":"string","format":"date-time"},"passing":{"type":"boolean"},"evidenceJson":{"description":"Opaque evidence payload (provider/check specific)."},"notes":{"type":"string","nullable":true},"collectedBy":{"type":"string","description":"Service / actor that gathered the evidence."},"expiresAt":{"type":"string","format":"date-time"}}},"ComplianceEvidenceListResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceEvidenceView"}}}},"ComplianceFindingView":{"type":"object","required":["id","controlId","severity","status","description","createdAt"],"properties":{"id":{"type":"string"},"controlId":{"type":"string"},"severity":{"type":"string","example":"high"},"status":{"type":"string","enum":["open","remediating","resolved","accepted-risk"]},"description":{"type":"string"},"remediationPlan":{"type":"string","nullable":true},"ownerUserId":{"type":"string","nullable":true},"dueAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time","nullable":true}}},"ComplianceFindingsResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceFindingView"}}}},"ComplianceFindingPatchInput":{"type":"object","description":"At least one field required.","properties":{"status":{"type":"string","enum":["open","remediating","resolved","accepted-risk"]},"remediationPlan":{"type":"string","maxLength":8000},"ownerUserId":{"type":"string","nullable":true},"dueAt":{"type":"string","format":"date-time","nullable":true}}},"CompliancePackQueueInput":{"type":"object","required":["framework"],"properties":{"framework":{"type":"string","enum":["SOC2","ISO27001","HIPAA","GDPR"]}}},"CompliancePackView":{"type":"object","required":["id","framework","generatedAt","status","downloadAvailable","controlsIncluded","passingCount","failingCount","expiresAt"],"properties":{"id":{"type":"string"},"framework":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"artifactUrl":{"type":"string","nullable":true},"downloadAvailable":{"type":"boolean"},"controlsIncluded":{"type":"integer"},"passingCount":{"type":"integer"},"failingCount":{"type":"integer"},"artifactSizeBytes":{"type":"integer","nullable":true},"artifactSha256":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time"}}},"CompliancePacksResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CompliancePackView"}}}},"CompliancePackDownloadResponse":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},"ComplianceForceCollectResponse":{"type":"object","required":["collected","passing","failing"],"properties":{"collected":{"type":"integer"},"passing":{"type":"integer"},"failing":{"type":"integer"}}},"EvidenceVaultView":{"type":"object","required":["generatedAt","tenantId","sources","packSummary","openFindingCount","permissionMatrix"],"properties":{"generatedAt":{"type":"string","format":"date-time"},"tenantId":{"type":"string"},"sources":{"type":"array","items":{"type":"object","required":["id","label","description","route","dataClass","visibility","retentionDays","itemCount"],"properties":{"id":{"type":"string","example":"audit-events"},"label":{"type":"string"},"description":{"type":"string"},"route":{"type":"string"},"dataClass":{"type":"string","enum":["operational-audit","user-audit","compliance-control","compliance-artifact","privacy-export"]},"visibility":{"type":"string","enum":["tenant-admin","self-or-tenant-admin","super-admin-summary"]},"retentionDays":{"type":"integer"},"exportFormats":{"type":"array","items":{"type":"string"}},"redactionPolicy":{"type":"string"},"analyticsId":{"type":"string"},"itemCount":{"type":"integer"},"latestAt":{"type":"string","format":"date-time","nullable":true}}}},"packSummary":{"type":"object","required":["total","ready","building","failed","downloadable","expired","expiringSoon","integrityCovered","totalArtifactBytes","nextExpirationAt"],"properties":{"total":{"type":"integer"},"ready":{"type":"integer"},"building":{"type":"integer"},"failed":{"type":"integer"},"downloadable":{"type":"integer"},"expired":{"type":"integer"},"expiringSoon":{"type":"integer"},"integrityCovered":{"type":"integer"},"totalArtifactBytes":{"type":"integer"},"nextExpirationAt":{"type":"string","format":"date-time","nullable":true},"active":{"type":"integer"},"legalHold":{"type":"integer"},"deletionHold":{"type":"integer"},"purgeEligible":{"type":"integer"},"purgeBlocked":{"type":"integer"},"purgeFailed":{"type":"integer"},"unknownRetention":{"type":"integer"},"missingChecksum":{"type":"integer"},"nextPurgeEligibleAt":{"type":"string","format":"date-time","nullable":true}}},"openFindingCount":{"type":"integer"},"permissionMatrix":{"type":"array","items":{"type":"object","required":["role","sourceId","allowed","scope"],"properties":{"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER","GUEST","SUPER_ADMIN"]},"sourceId":{"type":"string"},"allowed":{"type":"boolean"},"scope":{"type":"string","enum":["all-tenant","self","summary-only","denied"]}}}}}},"EvidencePackJobStatus":{"type":"string","enum":["queued","running","ready","failed"]},"EvidencePackJobView":{"type":"object","required":["jobId","tenantId","framework","status","requestedAt","requestedByEmail","controlsIncluded"],"properties":{"jobId":{"type":"string"},"tenantId":{"type":"string"},"framework":{"type":"string","enum":["SOC2","ISO27001","HIPAA-prep"]},"status":{"$ref":"#/components/schemas/EvidencePackJobStatus"},"requestedAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"requestedByEmail":{"type":"string","format":"email"},"downloadUrl":{"type":"string","nullable":true},"artifactSha256":{"type":"string","nullable":true},"artifactSizeBytes":{"type":"integer","nullable":true},"controlsIncluded":{"type":"integer"},"errorMessage":{"type":"string","nullable":true}}},"EvidencePackJobsResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EvidencePackJobView"}}}},"EvidencePackRequestInput":{"type":"object","required":["framework"],"properties":{"framework":{"type":"string","enum":["SOC2","ISO27001","HIPAA-prep"]},"tenantId":{"type":"string","minLength":1,"description":"Defaults to the caller tenant when omitted."}}},"EvidencePackRequestResponse":{"type":"object","required":["jobId"],"properties":{"jobId":{"type":"string"}}},"RateLimitTier":{"type":"string","enum":["free","pro","enterprise"]},"RateLimitClass":{"type":"string","enum":["read","write","ai"]},"RateLimitBucket":{"type":"object","required":["limit","windowMs"],"properties":{"limit":{"type":"integer"},"windowMs":{"type":"integer","description":"Rolling window length in milliseconds."}}},"RateLimitTierConfig":{"type":"object","required":["tier","label","buckets"],"properties":{"tier":{"$ref":"#/components/schemas/RateLimitTier"},"label":{"type":"string"},"buckets":{"type":"object","required":["read","write","ai"],"properties":{"read":{"$ref":"#/components/schemas/RateLimitBucket"},"write":{"$ref":"#/components/schemas/RateLimitBucket"},"ai":{"$ref":"#/components/schemas/RateLimitBucket"}}}}},"RateLimitUsageSnapshot":{"type":"object","required":["endsAt","perMinute","total"],"properties":{"endsAt":{"type":"string","format":"date-time","description":"Wall-clock end of the most recent minute."},"perMinute":{"type":"array","items":{"type":"integer"},"description":"Oldest-to-newest per-minute counts."},"total":{"type":"integer","description":"Sum of perMinute."}}},"RateLimitCurrentTierView":{"type":"object","required":["tier","label","buckets","catalog","usage"],"properties":{"tier":{"$ref":"#/components/schemas/RateLimitTier"},"label":{"type":"string"},"buckets":{"type":"object","required":["read","write","ai"],"properties":{"read":{"$ref":"#/components/schemas/RateLimitBucket"},"write":{"$ref":"#/components/schemas/RateLimitBucket"},"ai":{"$ref":"#/components/schemas/RateLimitBucket"}}},"catalog":{"type":"array","items":{"$ref":"#/components/schemas/RateLimitTierConfig"}},"usage":{"type":"object","required":["read","write","ai"],"properties":{"read":{"$ref":"#/components/schemas/RateLimitUsageSnapshot"},"write":{"$ref":"#/components/schemas/RateLimitUsageSnapshot"},"ai":{"$ref":"#/components/schemas/RateLimitUsageSnapshot"}}}}},"TenantWorkspaceBrandingView":{"type":"object","required":["displayName","logoUrl","brandColor"],"properties":{"displayName":{"type":"string","nullable":true,"maxLength":80},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"brandColor":{"type":"string","nullable":true,"pattern":"^#[0-9a-fA-F]{6}$","example":"#1F6FEB"}}},"TenantWorkspaceBrandingPutInput":{"type":"object","description":"Empty string clears a field; omitting a field preserves the prior value. PUT is idempotent.","properties":{"displayName":{"type":"string","maxLength":80,"nullable":true},"logoUrl":{"type":"string","maxLength":2048,"nullable":true,"description":"Must be https://... or empty."},"brandColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","nullable":true}}},"FeedbackCategory":{"type":"string","enum":["bug","idea","praise","question","other"]},"FeedbackStatus":{"type":"string","enum":["new","in-progress","resolved","archived"]},"FeedbackTriageStatus":{"type":"string","enum":["new","triaged","in-progress","resolved","wontfix"]},"FeedbackPriority":{"type":"string","enum":["low","normal","high","critical"]},"FeedbackProductArea":{"type":"string","enum":["tasks","calendar","reports","pdf-studio","crm","automations","integrations","mobile","admin","billing","performance","other"]},"FeedbackImpact":{"type":"string","enum":["blocked","degraded","confusing","minor","positive"]},"FeedbackSubmissionRow":{"type":"object","required":["id","route","message","category","productArea","impact","status","triageStatus","priority","context","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string","format":"email"},"contactName":{"type":"string"},"contactCompany":{"type":"string"},"contactPhone":{"type":"string"},"title":{"type":"string"},"route":{"type":"string"},"userAgent":{"type":"string"},"message":{"type":"string"},"expectedBehavior":{"type":"string"},"actualBehavior":{"type":"string"},"stepsToReproduce":{"type":"string"},"category":{"$ref":"#/components/schemas/FeedbackCategory"},"productArea":{"$ref":"#/components/schemas/FeedbackProductArea"},"impact":{"$ref":"#/components/schemas/FeedbackImpact"},"status":{"$ref":"#/components/schemas/FeedbackStatus"},"triageStatus":{"$ref":"#/components/schemas/FeedbackTriageStatus"},"priority":{"$ref":"#/components/schemas/FeedbackPriority"},"assignedToUserId":{"type":"string"},"internalNote":{"type":"string"},"screenshot":{"type":"object","properties":{"dataUrl":{"type":"string"},"name":{"type":"string"},"mime":{"type":"string","enum":["image/png","image/jpeg","image/webp"]}}},"context":{"type":"object","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"FeedbackListResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackSubmissionRow"}}}},"FeedbackTriagePatchInput":{"type":"object","description":"At least one field required.","properties":{"status":{"$ref":"#/components/schemas/FeedbackStatus"},"triageStatus":{"$ref":"#/components/schemas/FeedbackTriageStatus"},"priority":{"$ref":"#/components/schemas/FeedbackPriority"},"assignedToUserId":{"type":"string","nullable":true,"maxLength":64},"internalNote":{"type":"string","nullable":true,"maxLength":8000}}},"WalkthroughCompletion":{"type":"object","required":["walkthroughId","completedAt"],"properties":{"walkthroughId":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$","example":"first-task"},"completedAt":{"type":"string","format":"date-time"}}},"WalkthroughStateResponse":{"type":"object","required":["completions"],"properties":{"completions":{"type":"array","items":{"$ref":"#/components/schemas/WalkthroughCompletion"}}}},"StatusIncidentSeverity":{"type":"string","enum":["degraded","outage","maintenance"]},"StatusIncidentResponse":{"type":"object","required":["id","tenantId","severity","title","description","components","startedAt","resolvedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string","nullable":true,"description":"Null when the incident is platform-wide (visible on every tenant timeline)."},"severity":{"$ref":"#/components/schemas/StatusIncidentSeverity"},"title":{"type":"string"},"description":{"type":"string"},"components":{"type":"array","items":{"type":"string"}},"startedAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"StatusIncidentListResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/StatusIncidentResponse"}}}},"StatusIncidentCreateInput":{"type":"object","required":["severity","title","description"],"properties":{"tenantId":{"type":"string","nullable":true,"maxLength":80,"description":"When omitted the incident is platform-wide."},"severity":{"$ref":"#/components/schemas/StatusIncidentSeverity"},"title":{"type":"string","minLength":1,"maxLength":240},"description":{"type":"string","minLength":1,"maxLength":8000},"components":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":120}},"startedAt":{"type":"string","format":"date-time"}}},"StatusIncidentUpdateInput":{"type":"object","description":"At least one field required.","properties":{"severity":{"$ref":"#/components/schemas/StatusIncidentSeverity"},"title":{"type":"string","minLength":1,"maxLength":240},"description":{"type":"string","minLength":1,"maxLength":8000},"components":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":120}}}},"DataExportStatus":{"type":"string","enum":["queued","running","ready","failed"]},"DataExportJobView":{"type":"object","required":["id","status","requestedById","requestedAt","hasDownload"],"properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/DataExportStatus"},"requestedById":{"type":"string"},"artifactSizeBytes":{"type":"integer","nullable":true},"artifactSha256":{"type":"string","nullable":true},"rowCount":{"type":"integer","nullable":true},"failureReason":{"type":"string","nullable":true},"requestedAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"hasDownload":{"type":"boolean"}}},"DataExportJobListResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DataExportJobView"}}}},"DataExportStartResponse":{"type":"object","required":["jobId","status"],"properties":{"jobId":{"type":"string"},"status":{"$ref":"#/components/schemas/DataExportStatus"}}},"DataExportDownloadResponse":{"type":"object","required":["url","expiresAt","filename"],"properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"},"artifactSha256":{"type":"string","nullable":true},"artifactSizeBytes":{"type":"integer","nullable":true},"filename":{"type":"string"}}},"WikiTag":{"type":"object","required":["id","slug","label"],"properties":{"id":{"type":"string"},"slug":{"type":"string"},"label":{"type":"string"}}},"WikiComment":{"type":"object","required":["id","wikiPageId","authorUserId","body","createdAt"],"properties":{"id":{"type":"string"},"wikiPageId":{"type":"string"},"authorUserId":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"WikiPage":{"type":"object","required":["id","tenantId","parentId","title","slug","bodyMarkdown","ownerUserId","isPublished","version","createdAt","updatedAt","tags","commentCount"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"parentId":{"type":"string","nullable":true},"title":{"type":"string"},"slug":{"type":"string"},"bodyMarkdown":{"type":"string"},"ownerUserId":{"type":"string"},"isPublished":{"type":"boolean"},"lastEditedByUserId":{"type":"string","nullable":true},"version":{"type":"integer"},"publishedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/WikiTag"}},"commentCount":{"type":"integer"}}},"WikiPageDetail":{"allOf":[{"$ref":"#/components/schemas/WikiPage"},{"type":"object","required":["comments"],"properties":{"comments":{"type":"array","items":{"$ref":"#/components/schemas/WikiComment"}}}}]},"WikiPageListResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WikiPage"}}}},"WikiSearchHit":{"type":"object","required":["id","title","slug","snippet","isPublished","updatedAt"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"snippet":{"type":"string"},"isPublished":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}}},"WikiSearchResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WikiSearchHit"}}}},"WikiGraphResponse":{"type":"object","required":["nodes","edges"],"properties":{"nodes":{"type":"array","items":{"type":"object","required":["id","title","slug"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"}}}},"edges":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"}}}}}},"WikiPageCreateInput":{"type":"object","required":["title","slug"],"properties":{"title":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$","maxLength":120},"bodyMarkdown":{"type":"string","maxLength":200000},"parentId":{"type":"string","nullable":true},"isPublished":{"type":"boolean","default":false}}},"WikiPageUpdateInput":{"type":"object","description":"At least one field required.","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$","maxLength":120},"bodyMarkdown":{"type":"string","maxLength":200000},"parentId":{"type":"string","nullable":true}}},"WikiPagePublishInput":{"type":"object","required":["isPublished"],"properties":{"isPublished":{"type":"boolean"}}},"WikiCommentCreateInput":{"type":"object","required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":5000}}},"WikiTagsInput":{"type":"object","required":["tagSlugs"],"properties":{"tagSlugs":{"type":"array","maxItems":50,"items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$"}}}},"WikiPageDeleteResponse":{"type":"object","required":["id","deleted"],"properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}}},"AiObservabilitySummary":{"type":"object","required":["runsLast24h","successRate","p50LatencyMs","p95LatencyMs","costLast24hUsd"],"properties":{"runsLast24h":{"type":"integer"},"successRate":{"type":"number","minimum":0,"maximum":1},"p50LatencyMs":{"type":"integer"},"p95LatencyMs":{"type":"integer"},"costLast24hUsd":{"type":"number"}}},"AiObservabilityProviderTile":{"type":"object","required":["providerKey","calls24h","errorRate","costUsd","p95Ms"],"properties":{"providerKey":{"type":"string","example":"openai"},"calls24h":{"type":"integer"},"errorRate":{"type":"number"},"costUsd":{"type":"number"},"p95Ms":{"type":"integer"}}},"AiObservabilityProvidersResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AiObservabilityProviderTile"}}}},"AiObservabilityTrace":{"type":"object","required":["agentRunId","providerKey","durationMs","status","startedAt"],"properties":{"agentRunId":{"type":"string"},"providerKey":{"type":"string"},"durationMs":{"type":"integer"},"status":{"type":"string","enum":["completed","failed","running","queued"]},"errorClass":{"type":"string","nullable":true},"startedAt":{"type":"string","format":"date-time"}}},"AiObservabilityTracesResponse":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AiObservabilityTrace"}}}},"ThemeListItem":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"publishedAt":{"type":"string","format":"date-time","nullable":true},"authorTenantId":{"type":"string","nullable":true},"tokens":{"type":"object","additionalProperties":true,"description":"Theme token bundle (BrandPack subset)."}}},"ThemeListResponse":{"type":"array","items":{"$ref":"#/components/schemas/ThemeListItem"}},"ThemeImportPackInput":{"type":"object","description":"BrandPack JSON payload to import as a new theme.","additionalProperties":true},"ThemeMarketplaceQuery":{"type":"object","description":"Optional filters for the marketplace catalog list.","properties":{"q":{"type":"string","description":"Free-text search across theme name and description."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50}}},"ThemePublishInput":{"type":"object","required":["isPublished"],"properties":{"isPublished":{"type":"boolean"}}},"ProblemJson":{"type":"object","required":["title","status"],"description":"RFC 7807 problem+json. All non-2xx responses use this shape.","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"requestId":{"type":"string","description":"Correlation id echoed in the x-request-id response header."}}},"WebhookDelivery":{"type":"object","required":["id","action","attempt","statusCode","ok","url","at"],"description":"A single webhook delivery attempt. Captures the request Atlas sent + whatever response (or error) came back. Powers the retry-state UI and the `replay` endpoint.","properties":{"id":{"type":"string","example":"whd_01HW3T2K8X9Y2VPRZGQX9NDY1F"},"action":{"type":"string","description":"The event name as published by Atlas (e.g. `task.created`). Same as the `event` field in the request body.","example":"task.created"},"sourceAction":{"type":"string","description":"Internal source action that triggered the event.","example":"TASK_CREATED"},"attempt":{"type":"integer","description":"1-indexed; first attempt = 1, retries increment.","example":1},"statusCode":{"type":"integer","nullable":true,"description":"HTTP status code from the receiver. Null when the request never reached the receiver (DNS, TLS, timeout).","example":200},"ok":{"type":"boolean","description":"2xx status from receiver = true.","example":true},"error":{"type":"string","nullable":true},"errorKind":{"type":"string","nullable":true,"enum":["NETWORK","TIMEOUT","TLS","DNS","NON_2XX","INVALID_RESPONSE",null]},"isManualTest":{"type":"boolean","example":false},"retryState":{"type":"string","enum":["NONE","PENDING","EXHAUSTED"],"description":"NONE = success or non-retriable. PENDING = retry queued (see `nextRetryAt`). EXHAUSTED = all retries spent; the hook is paused."},"nextRetryAt":{"type":"string","format":"date-time","nullable":true},"nextAttemptNumber":{"type":"integer","nullable":true},"url":{"type":"string","format":"uri"},"durationMs":{"type":"integer","nullable":true},"requestMethod":{"type":"string","example":"POST"},"requestBody":{"type":"string","nullable":true},"requestBodyTruncated":{"type":"boolean"},"responseBody":{"type":"string","nullable":true},"responseBodyTruncated":{"type":"boolean"},"at":{"type":"string","format":"date-time"},"webhook":{"type":"object","description":"Snapshot of the webhook config at delivery time.","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}}}}}}}},"security":[{"bearerAuth":[]}],"paths":{"/v1/tasks":{"post":{"summary":"Create a task","description":"Create a task in `projectId`. The minimal body is `{ projectId, title }`; every other field has a server default. Send an `Idempotency-Key` header and the same `(key, body)` retried within 24h returns the cached 2xx response - safe to fire-and-forget from queues. Returns the full `Task` shape with `version: 0`; pass that version in `If-Match` on the next PATCH for optimistic concurrency.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":256},"description":"Opaque key; identical retries within 24h return the cached 2xx response.","example":"task-create-2026-05-06-load-shed-42"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskInput"},"examples":{"minimal":{"summary":"Minimal - only projectId + title","value":{"projectId":"prj_01HW3T2K8X9Y2VPRZGQX9NDY1A","title":"Draft launch announcement"}},"full":{"summary":"Full - every supported field","value":{"projectId":"prj_01HW3T2K8X9Y2VPRZGQX9NDY1A","title":"Ship public API + MCP","description":"Cut v1 of the public API + MCP server, gate behind PAT.","visibility":"SHARED","recurrence":"NONE","priority":"HIGH","status":"IN_PROGRESS","dueOn":"2026-06-01T17:00:00Z","startsOn":"2026-05-20T09:00:00Z","remindAt":"2026-05-31T09:00:00Z","estimateMin":480}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"tsk_01HW3T2K8X9Y2VPRZGQX9NDY1B","tenantId":"tnt_01HW3T2K8X9Y2VPRZGQX9NDY00","projectId":"prj_01HW3T2K8X9Y2VPRZGQX9NDY1A","parentId":null,"title":"Ship public API + MCP","description":null,"visibility":"SHARED","recurrence":"NONE","priority":"HIGH","status":"IN_PROGRESS","version":0,"dueOn":"2026-06-01T17:00:00Z","startsOn":null,"remindAt":null,"estimateMin":480,"deletedAt":null,"createdAt":"2026-05-06T17:00:00Z","updatedAt":"2026-05-06T17:00:00Z"}}}},"401":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a task","description":"Read a single task by id. Returns 404 if the task is soft-deleted (`deletedAt != null`) or owned by a different tenant - never leaks cross-tenant existence. The returned `version` is the current optimistic-concurrency cursor; capture it before mutating.","tags":["Tasks"],"x-ratelimit-class":"read","x-required-scopes":["tasks:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update a task (optimistic concurrency)","description":"Patch any subset of fields. The body is a partial `CreateTaskInput`; only fields you include are touched. Send `If-Match: <version>` to enable optimistic concurrency - a stale version returns 409 instead of overwriting a newer version. Omit `If-Match` to last-write-wins (not recommended for concurrent editors).","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"parameters":[{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"Non-negative integer version. 409 if stale.","example":"7"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"},"examples":{"statusOnly":{"summary":"Mark complete","value":{"status":"DONE"}},"rescheduleAndReassign":{"summary":"Reschedule + bump priority","value":{"dueOn":"2026-06-15T17:00:00Z","priority":"URGENT"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Soft-delete a task","description":"Soft-deletes the task: sets `deletedAt` to \"now\" and the row stops appearing in list / search results. Subtasks remain live (orphaned at the parent). Idempotent - calling twice is a no-op rather than an error.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:delete"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/{id}/dependencies":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List dependencies for a task","tags":["Tasks"],"x-ratelimit-class":"read","x-required-scopes":["tasks:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDependencies"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Create a dependency from the path task to another task","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDependencyCreateInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDependency"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/{id}/dependencies/{toTaskId}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"toTaskId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete a dependency","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/tasks":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List tasks in a project","description":"Cursor-paginated task list scoped to one project. The default page size is 50, max 200 - pass `cursor` from the previous response's `nextCursor` to walk further. `nextCursor` is `null` on the last page. Soft-deleted tasks are filtered out by default; pass `?includeDeleted=true` to include them.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["tasks:read","projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"nextCursor":{"type":"string","nullable":true}}},"example":{"items":[{"id":"tsk_01HW3T2K8X9Y2VPRZGQX9NDY1B","tenantId":"tnt_01HW3T2K8X9Y2VPRZGQX9NDY00","projectId":"prj_01HW3T2K8X9Y2VPRZGQX9NDY1A","parentId":null,"title":"Ship public API + MCP","description":null,"visibility":"SHARED","recurrence":"NONE","priority":"HIGH","status":"IN_PROGRESS","version":3,"dueOn":"2026-06-01T17:00:00Z","startsOn":null,"remindAt":null,"estimateMin":480,"deletedAt":null,"createdAt":"2026-05-01T09:00:00Z","updatedAt":"2026-05-06T17:00:00Z"}],"nextCursor":"eyJsYXN0SWQiOiJ0c2tfMDFIVzNUMksifQ"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/pats":{"get":{"summary":"List personal access tokens","tags":["PATs"],"x-ratelimit-class":"read","x-required-scopes":["pats:manage"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Pat"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Create a personal access token","description":"Mint a PAT (`atlas_pat_*`). The raw token is returned in the 201 body **exactly once** - capture it before navigating away or you will have to mint a new one. Pick the narrowest `scopes` that fit the workload (see `info.x-scopes`); empty `allowedIps` means any IP can call the API with this token. The integration that uses this token should hit `/v1/tasks` next; that's where every developer-facing example starts.","tags":["PATs"],"x-ratelimit-class":"write","x-required-scopes":["pats:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatInput"},"examples":{"slackBot":{"summary":"Read-only token for an external Slack bot","value":{"name":"Slack ingestion bot","scopes":["tasks:read","projects:read","profile:read"],"allowedIps":["203.0.113.4"]}},"ciJob":{"summary":"Mutating token for a CI job, expires in 90 days","value":{"name":"release-bot","scopes":["tasks:write","projects:read"],"expiresAt":"2026-08-04T00:00:00Z"}}}}}},"responses":{"201":{"description":"Created. The raw token is included once and only once.","content":{"application/json":{"schema":{"type":"object","required":["pat","token"],"properties":{"pat":{"$ref":"#/components/schemas/Pat"},"token":{"$ref":"#/components/schemas/RawPatToken"}}},"example":{"pat":{"id":"pat_01HW3T2K8X9Y2VPRZGQX9NDY1C","name":"Slack ingestion bot","prefix":"atlas_pat_3xK","scopes":["tasks:read","projects:read","profile:read"],"allowedIps":["203.0.113.4"],"createdAt":"2026-05-06T17:00:00Z","lastUsedAt":null,"expiresAt":null,"revokedAt":null},"token":"atlas_pat_3xK7p9aQzL2m...REDACTED-49-CHARS-TOTAL"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/pats/{id}/rotate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"post":{"summary":"Rotate a PAT","description":"Revokes the selected PAT and returns a replacement token once. Optional body fields override the replacement label, scopes, IP allowlist, or expiration; omitting the body preserves the previous metadata.","tags":["PATs"],"x-ratelimit-class":"write","x-required-scopes":["pats:manage"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatePatInput"}}}},"responses":{"200":{"description":"Rotated. The replacement raw token is included once and only once.","content":{"application/json":{"schema":{"type":"object","required":["pat","token"],"properties":{"pat":{"$ref":"#/components/schemas/Pat"},"token":{"$ref":"#/components/schemas/RawPatToken"}}}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/pats/{id}/revoke":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"post":{"summary":"Revoke a PAT","tags":["PATs"],"x-ratelimit-class":"write","x-required-scopes":["pats:manage"],"responses":{"204":{"description":"Revoked"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/webhooks":{"get":{"summary":"List webhooks","description":"Returns every webhook registered for the calling tenant. The `secret` field is **never** included - only the metadata developers need to identify a hook (id, target URL, events, enabled flag, last-success/last-failure timestamps).","tags":["Webhooks"],"x-ratelimit-class":"read","x-required-scopes":["webhooks:manage"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}},"example":{"items":[{"id":"wh_01HW3T2K8X9Y2VPRZGQX9NDY1D","url":"https://hooks.example.com/atlas","events":["task.created","task.completed"],"enabled":true,"ownerLabel":"Launch room ops","escalationEmail":"platform@acme.dev","escalationNote":null,"lastSuccessAt":"2026-05-06T16:55:00Z","lastFailureAt":null,"consecutiveFailures":0,"createdAt":"2026-04-01T09:30:00Z"}]}}}},"401":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Register a webhook","description":"Register an outbound webhook. Atlas will POST a JSON body + an `X-Atlas-Signature` HMAC-SHA256 header (signed with the secret returned in this 201) to `url` for every event in `events`. The secret is returned **once** in the response body - store it; subsequent reads omit it. Failed deliveries retry with exponential backoff for 24h before pausing the hook.","tags":["Webhooks"],"x-ratelimit-class":"write","x-required-scopes":["webhooks:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookInput"},"examples":{"taskLifecycle":{"summary":"Track task lifecycle into a Slack inbox","value":{"url":"https://hooks.example.com/atlas","events":["task.created","task.completed","task.deleted"]}},"allEvents":{"summary":"Fan everything to a custom listener","value":{"url":"https://listener.internal.acme.dev/atlas-bus","events":["*"],"ownerLabel":"Internal bus","escalationEmail":"oncall@acme.dev"}}}}}},"responses":{"201":{"description":"Created. Includes the signing secret - capture it now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateResponse"},"example":{"webhook":{"id":"wh_01HW3T2K8X9Y2VPRZGQX9NDY1D","url":"https://hooks.example.com/atlas","events":["task.created","task.completed"],"enabled":true,"ownerLabel":null,"escalationEmail":null,"escalationNote":null,"lastSuccessAt":null,"lastFailureAt":null,"consecutiveFailures":0,"createdAt":"2026-05-06T17:00:00Z"},"secret":"whsec_3xK7p9aQzL2m...REDACTED-32-CHARS"}}}},"401":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/webhook-deliveries":{"get":{"summary":"List recent delivery attempts across all webhooks in the tenant","description":"Returns the most-recent delivery attempts across **every** webhook in the tenant, newest first. Useful for an ops dashboard showing \"what just fired and did it work?\". For a single webhook's history, hit `/v1/webhooks/{id}/deliveries` instead.","tags":["Webhooks"],"x-ratelimit-class":"read","x-required-scopes":["webhooks:manage"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Page size cap. Default 50, max 200."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"example":{"items":[{"id":"whd_01HW3T2K8X9Y2VPRZGQX9NDY1F","action":"task.created","sourceAction":"TASK_CREATED","attempt":1,"statusCode":200,"ok":true,"error":null,"errorKind":null,"isManualTest":false,"retryState":"NONE","nextRetryAt":null,"nextAttemptNumber":null,"url":"https://hooks.example.com/atlas","durationMs":142,"requestMethod":"POST","requestBody":"{\"event\":\"task.created\",\"data\":{...}}","requestBodyTruncated":false,"responseBody":"{\"received\":true}","responseBodyTruncated":false,"at":"2026-05-06T17:00:00Z","webhook":{"id":"wh_01HW3T2K8X9Y2VPRZGQX9NDY1D","url":"https://hooks.example.com/atlas","events":["task.created","task.completed"]}}]}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/webhooks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update a webhook (url, events, ownership, or pause/resume)","description":"Patch any subset of `url`, `events`, `ownerLabel`, `escalationEmail`, `escalationNote`, and `disabled`. The signing secret is preserved across updates - rotate it explicitly via `POST /v1/webhooks/{id}/rotate-key` when you want to invalidate the old secret.","tags":["Webhooks"],"x-ratelimit-class":"write","x-required-scopes":["webhooks:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookInput"},"examples":{"pause":{"summary":"Pause a webhook","value":{"disabled":true}},"resume":{"summary":"Resume a paused webhook","value":{"disabled":false}},"changeEvents":{"summary":"Subscribe to additional events","value":{"events":["task.created","task.completed","comment.created"]}},"rebrand":{"summary":"Update owner label + escalation contact","value":{"ownerLabel":"Platform on-call","escalationEmail":"platform-oncall@acme.dev"}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"},"example":{"id":"wh_01HW3T2K8X9Y2VPRZGQX9NDY1D","url":"https://hooks.example.com/atlas","events":["task.created","task.completed"],"enabled":false,"ownerLabel":"Launch room ops","escalationEmail":"platform@acme.dev","escalationNote":null,"lastSuccessAt":"2026-05-06T16:55:00Z","lastFailureAt":null,"consecutiveFailures":0,"createdAt":"2026-04-01T09:30:00Z"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Delete a webhook","description":"Permanent delete. The webhook stops receiving events immediately and the signing secret is invalidated. Existing delivery rows are preserved (so the audit trail survives) but `replay` calls against them will 404 once the parent webhook is gone. Idempotent - deleting an already-deleted hook returns 204 rather than 404.","tags":["Webhooks"],"x-ratelimit-class":"write","x-required-scopes":["webhooks:manage"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/webhooks/{id}/rotate-key":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Rotate the HMAC signing key for a webhook","description":"Issues a fresh signing secret (`whsec_*`) and returns it ONCE. The previous secret remains valid for 24 hours so receivers can roll forward without an outage window - both signatures verify during the overlap. After 24h the old secret is purged and only the new one is accepted.","tags":["Webhooks"],"x-ratelimit-class":"write","x-required-scopes":["webhooks:manage"],"responses":{"200":{"description":"Rotated. Includes the NEW secret + the timestamp at which the previous one expires.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotateResponse"},"example":{"webhook":{"id":"wh_01HW3T2K8X9Y2VPRZGQX9NDY1D","url":"https://hooks.example.com/atlas","events":["task.created","task.completed"],"enabled":true,"ownerLabel":null,"escalationEmail":null,"escalationNote":null,"lastSuccessAt":"2026-05-06T16:55:00Z","lastFailureAt":null,"consecutiveFailures":0,"createdAt":"2026-04-01T09:30:00Z"},"secret":"whsec_4yL8q0bRzM3n...REDACTED-32-CHARS","previousSecretExpiresAt":"2026-05-07T17:00:00Z"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/webhooks/{id}/deliveries":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Page size cap. Default 50, max 200."}],"get":{"summary":"List recent delivery attempts for a webhook","description":"Per-webhook delivery history, newest first. The shape is identical to `GET /v1/webhook-deliveries` but scoped to one hook - perfect for a \"Recent activity\" panel inside a webhook detail page.","tags":["Webhooks"],"x-ratelimit-class":"read","x-required-scopes":["webhooks:manage"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/webhooks/{id}/test-delivery":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Send a manual test delivery to a webhook","description":"Fires a synthetic `webhook.test` event to the hook's URL, signed with the same HMAC secret as production traffic. The request returns immediately (202); inspect the resulting row via `/v1/webhooks/{id}/deliveries`. `isManualTest` is set on the delivery row so dashboards can filter test traffic out.","tags":["Webhooks"],"x-ratelimit-class":"write","x-required-scopes":["webhooks:manage"],"responses":{"202":{"description":"Accepted - the test delivery is queued.","content":{"application/json":{"schema":{"type":"object","required":["ok","deliveryId"],"properties":{"ok":{"type":"boolean"},"deliveryId":{"type":"string","description":"Id of the synthetic delivery row."}}},"example":{"ok":true,"deliveryId":"whd_01HW3T2K8X9Y2VPRZGQX9NDY1G"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/webhooks/{id}/deliveries/{deliveryId}/replay":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Replay a prior webhook delivery","description":"Re-sends the exact same request body that the original delivery attempt used - useful for \"the receiver was down for an hour, replay anything that 5xx'd during that window\". The replay creates a NEW delivery row (so the original audit trail is preserved); the new row's `attempt` resets to 1 and `isManualTest` is `false`.","tags":["Webhooks"],"x-ratelimit-class":"write","x-required-scopes":["webhooks:manage"],"responses":{"202":{"description":"Accepted - the replay is queued.","content":{"application/json":{"schema":{"type":"object","required":["ok","replayDeliveryId"],"properties":{"ok":{"type":"boolean"},"replayDeliveryId":{"type":"string"}}},"example":{"ok":true,"replayDeliveryId":"whd_01HW3T2K8X9Y2VPRZGQX9NDY1H"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/appointments":{"get":{"summary":"List appointments (confirmed bookings) for the calling host","tags":["Appointments"],"x-ratelimit-class":"read","x-required-scopes":["appointments:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["upcoming","past","all"]},"description":"Filter by lifecycle. Defaults to `upcoming`."},{"name":"bookingPageId","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"attendee","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/appointments/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a single appointment","tags":["Appointments"],"x-ratelimit-class":"read","x-required-scopes":["appointments:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update host-only fields on an appointment (private notes, meeting URL, location)","tags":["Appointments"],"x-ratelimit-class":"write","x-required-scopes":["appointments:write"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/appointments/{id}/reschedule":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Move an appointment to a new slot (host-initiated)","tags":["Appointments"],"x-ratelimit-class":"write","x-required-scopes":["appointments:write"],"responses":{"200":{"description":"Rescheduled"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/appointments/{id}/cancel":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Cancel an appointment","tags":["Appointments"],"x-ratelimit-class":"write","x-required-scopes":["appointments:write"],"responses":{"200":{"description":"Cancelled"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/appointments/{id}/reminder":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Send a reminder email to the guest (rate-limited to once per hour per booking)","tags":["Appointments"],"x-ratelimit-class":"write","x-required-scopes":["appointments:write"],"responses":{"200":{"description":"Sent"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/appointments/{id}/no-show":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Toggle the no-show flag on a past appointment","tags":["Appointments"],"x-ratelimit-class":"write","x-required-scopes":["appointments:write"],"responses":{"200":{"description":"Updated"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/profile/me/extras":{"get":{"summary":"Read the calling user's \"Additional\" profile fields","description":"Returns the 14 Iteration-5 profile fields. None of them count toward the profile-completeness percentage; the response is a flat object documented inline in the response body.","tags":["Profile"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update any subset of the Additional profile fields","tags":["Profile"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK"},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/profile/me/about":{"get":{"summary":"Read the calling user's personal About page (block content)","tags":["Profile"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Replace the calling user's About page blocks","tags":["Profile"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK"},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/profile/{userId}/extras":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read another user's Additional profile fields","description":"HR-sensitive fields (`phone`, `emergencyContact`) are returned as `null` unless the caller is the user themselves, anywhere in their manager chain, or holds the workspace OWNER role. The `hrFiltered` flag on the response indicates whether filtering was applied.","tags":["Profile"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/profile/{userId}/about":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read another user's About page","tags":["Profile"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/profile/{userId}/manager-chain":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List managers up the chain (closest first, root last)","tags":["Profile"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/profile/{userId}/direct-reports":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List direct reports of the user","tags":["Profile"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/profile/org-chart":{"get":{"summary":"Tenant-wide org chart derived from `managerId` graph","description":"Returns `roots` (users with no manager) and `unparented` (users whose manager is outside the tenant). Each node carries its `reports` array recursively.","tags":["Profile"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/project-dependencies":{"get":{"summary":"List project-to-project dependencies for a project","description":"Returns every live dependency edge involving the queried project. `direction=from` returns outgoing edges (this project blocks / relates / duplicates others), `direction=to` returns incoming edges. Omitting `direction` returns both. Each item carries the peer project name + status for at-a-glance display.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["from","to"]}}],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Create a project-to-project dependency","description":"Creates a directed edge between two projects. `kind` defaults to BLOCKS; the server runs DFS-based cycle detection and rejects edges that would close a loop. Self-loops (`fromProjectId == toProjectId`) are rejected at the schema level.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/project-dependencies/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Soft-delete a project dependency","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"responses":{"204":{"description":"Deleted"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/project-risks":{"get":{"summary":"List risks on a project","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["OPEN","MITIGATING","ACCEPTED","CLOSED"]}}],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Open a new project risk","description":"Files a new risk on `projectId`. Required body: `projectId`, `title`, `likelihood` (1-5), `impact` (1-5). Optional: `description`, `mitigation`, `ownerId`, `status` (defaults to `OPEN`). The product of `likelihood * impact` (1-25) drives the rollup's severity flag: ≥12 promotes the project badge to AMBER, ≥20 to RED.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"},"examples":{"minimal":{"summary":"Minimal - required fields only","value":{"projectId":"prj_01HW3T2K8X9Y2VPRZGQX9NDY1A","title":"Vendor SLA misses Q3 launch window","likelihood":4,"impact":5}},"full":{"summary":"Full - with mitigation + owner assignment","value":{"projectId":"prj_01HW3T2K8X9Y2VPRZGQX9NDY1A","title":"Vendor SLA misses Q3 launch window","description":"Backup-vendor signed contract slipping by 3 weeks.","likelihood":4,"impact":5,"status":"MITIGATING","mitigation":"Spin up internal fallback service by 2026-07-15.","ownerId":"usr_01HW3T2K8X9Y2VPRZGQX9NDY10"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"example":{"id":"rsk_01HW3T2K8X9Y2VPRZGQX9NDY1E","projectId":"prj_01HW3T2K8X9Y2VPRZGQX9NDY1A","title":"Vendor SLA misses Q3 launch window","description":null,"likelihood":4,"impact":5,"severity":20,"status":"OPEN","mitigation":null,"ownerId":null,"createdAt":"2026-05-06T17:00:00Z","updatedAt":"2026-05-06T17:00:00Z"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/role-changes/{id}/manager-approve":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Manager approves a role-change request","description":"Stamps `managerApprovedAt`/`managerApprovedById` and moves the row to MANAGER_APPROVED. Caller must not be the requester.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleChange"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/role-changes/{id}/hr-approve":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"HR approves a role-change request (final approval)","description":"Requires OWNER/ADMIN. Writes the change onto the Employee row and stamps `hrApprovedAt` + `appliedAt`. Terminal state.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleChange"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/role-changes/{id}/reject":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Reject a role-change request","description":"Stamps `rejectionReason` and moves the row to REJECTED. Terminal state; a fresh request is required to retry.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectRoleChangeInput"},"example":{"reason":"Budget for the new band not approved this cycle."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleChange"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/exit-interviews":{"get":{"summary":"List exit interviews (admin view)","description":"Admin listing with optional reason + date-range filters. Returns full interview rows including structured responses.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"reason","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ExitInterviewReason"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExitInterview"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Submit an exit interview on behalf of an employee","description":"Admin variant. One interview per employee - submitting twice 409s. Use the self-service endpoint when the departing teammate wants to fill the form themselves.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitExitInterviewInput"},"example":{"employeeId":"emp_01HW3T...","lastWorkingDay":"2026-05-31","reason":"CAREER_GROWTH","satisfaction":4,"wouldRecommend":5,"responses":[{"questionId":"manager-quality","rating":5,"comments":"Great manager."},{"questionId":"comp-fairness","rating":3}],"notes":"Leaving for a senior IC role at a competitor."}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExitInterview"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/exit-interviews/by-employee/{employeeId}":{"parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List exit interviews filed for a given employee","description":"Returns the (at most one) interview tied to this employee. Empty array when none has been filed yet.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExitInterview"}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/exit-interview":{"post":{"summary":"Submit your own exit interview","description":"Self-service variant. `employeeId` is derived from the session - never accepted from the body.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitMyExitInterviewInput"},"example":{"lastWorkingDay":"2026-05-31","reason":"RELOCATION","satisfaction":4,"wouldRecommend":5,"responses":[{"questionId":"work-life-balance","rating":4,"comments":"Generally good, occasional crunch."}],"notes":"Moving back to Bangalore."}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExitInterview"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/letters":{"get":{"summary":"List generated HR letters","description":"Returns letters in descending generation order. Optionally filter by employee or letter type.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"employeeId","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/HrLetterType"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HrLetter"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Generate an HR letter (offer, relieving, employment, etc.)","description":"Renders a deterministic PDF body, persists the rendered text + variables for audit, and returns the letter envelope. Fetch the PDF blob via `/v1/hr/letters/{id}/pdf`.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateHrLetterInput"},"examples":{"offer":{"summary":"Offer letter","value":{"employeeId":"emp_01HW3T...","type":"OFFER","variables":{"jobTitle":"Senior Engineer","annualCtc":2400000,"currency":"INR","joiningDate":"2026-07-01"}}},"increment":{"summary":"Increment letter","value":{"employeeId":"emp_01HW3T...","type":"INCREMENT","variables":{"oldAnnualCtc":2400000,"newAnnualCtc":2750000,"currency":"INR","effectiveDate":"2026-04-01"}}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrLetter"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/letters/{id}/pdf":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Download a generated HR letter as PDF","description":"Returns the rendered PDF blob. 404 if the letter was revoked or belongs to a different tenant.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/letters/{id}/revoke":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Revoke a previously generated HR letter","description":"Sets `revoked: true`. The row is preserved for audit but the PDF endpoint returns 404 thereafter.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrLetter"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/reports/headcount":{"get":{"summary":"Read current headcount snapshot","description":"Aggregate employee count optionally split by department and location. Computed on read; no caching.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrHeadcountSnapshot"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/reports/headcount/timeseries":{"get":{"summary":"Read headcount over time (monthly buckets)","description":"Returns a count per month for the most-recent `months` window (default 12, capped at 60).","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":60}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrHeadcountTimeseries"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/reports/turnover":{"get":{"summary":"Read turnover rate over a window","description":"Voluntary + involuntary terminations divided by average headcount over the window. Returns the decimal rate (0.12 = 12%).","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"fromDate","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTurnoverReport"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/reports/leave-utilization":{"get":{"summary":"Read leave utilization for a calendar year","description":"Per leave-type allocated vs used for the chosen calendar year (defaults to current).","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"integer","minimum":2000,"maximum":2100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrLeaveUtilizationReport"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/email-templates":{"get":{"summary":"List per-tenant email templates","description":"Returns every template available to the calling tenant - both the per-tenant overrides (`isOverride: true`) and the system-shipped defaults that surface through the same resolver. Filter by `key`, `locale`, or `isActive`.","tags":["EmailTemplates"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"key","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]*$","maxLength":120}},{"name":"locale","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":16}},{"name":"isActive","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplate"}}}}}}},"401":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"put":{"summary":"Upsert a per-tenant email template (create or replace)","description":"Idempotent upsert keyed on `(tenantId, key, locale)`. Bumps `version` on every write so the editor can detect concurrent edits. A/B variant linkage via `variantOfTemplateId` + `trafficPct` is set here on the variant row, not on the primary.","tags":["EmailTemplates"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertEmailTemplateInput"},"examples":{"taskAssignment":{"summary":"Override the task-assigned email","value":{"key":"task.assignment","locale":"en","subject":"{{actorName}} assigned you \"{{taskTitle}}\"","htmlBody":"<p>Hi {{firstName}},</p><p>{{actorName}} assigned you <a href=\"{{taskUrl}}\">{{taskTitle}}</a>.</p>","textBody":"Hi {{firstName}}, {{actorName}} assigned you {{taskTitle}}: {{taskUrl}}","isActive":true}},"abVariant":{"summary":"Register an A/B variant capturing 25% of traffic","value":{"key":"task.assignment","locale":"en","subject":"⚡ {{taskTitle}} is on your plate","htmlBody":"<p>{{actorName}} just queued <strong>{{taskTitle}}</strong> for you.</p>","textBody":"{{actorName}} just queued {{taskTitle}} for you.","isActive":true,"variantOfTemplateId":"etpl_01HW3T2K8X9Y2VPRZGQX9NDY60","trafficPct":25}}}}}},"responses":{"200":{"description":"Created or replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"401":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/email-templates/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one email template","tags":["EmailTemplates"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/email-templates/preview":{"post":{"summary":"Render an email template against sample variables (no send)","description":"Server-side renders the template using the supplied `variables`. Pass inline `subject` / `htmlBody` / `textBody` to preview unsaved drafts without persisting. Returns the rendered shapes plus `usedOverride` so the editor can warn when the preview hit the shipped default instead of a per-tenant override.","tags":["EmailTemplates"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewEmailTemplateInput"},"examples":{"basic":{"summary":"Preview the shipped template against sample variables","value":{"key":"task.assignment","locale":"en","variables":{"firstName":"Jordan","actorName":"Priya","taskTitle":"Ship public API","taskUrl":"https://atlas.wrxstack.com/tasks/tsk_xyz"}}},"draft":{"summary":"Preview an unsaved draft with inline overrides","value":{"key":"task.assignment","locale":"en","subject":"Draft: {{taskTitle}}","htmlBody":"<p>Draft body for {{firstName}}.</p>","textBody":"Draft body for {{firstName}}.","variables":{"firstName":"Jordan","taskTitle":"Ship public API"}}}}}}},"responses":{"200":{"description":"Rendered preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplatePreviewResponse"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/email-templates/test-send":{"post":{"summary":"Open a mailto: link rendered from a template (no server-side SMTP)","description":"Renders the template against `variables` and returns a `mailto:` URL the FE opens so the admin's local mail client sends the test - this avoids paying for an SMTP send during admin previews and dodges spam-list reputation hits.","tags":["EmailTemplates"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSendEmailTemplateInput"},"examples":{"send":{"summary":"Render the task-assignment template to a test recipient","value":{"key":"task.assignment","locale":"en","toEmail":"jordan@acme.dev","variables":{"firstName":"Jordan","actorName":"Priya","taskTitle":"Ship public API"}}}}}}},"responses":{"200":{"description":"mailto: link ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateTestSendResponse"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/admin/email-templates/{templateId}/variants":{"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List per-locale variants for a template","tags":["EmailTemplates"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateVariant"}}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/admin/email-templates/{templateId}/variants/{locale}":{"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z-]+$","minLength":2,"maxLength":16},"description":"BCP-47-ish locale tag (e.g. `en`, `es`, `fr`, `en-GB`)."}],"get":{"summary":"Read a single per-locale variant","tags":["EmailTemplates"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateVariant"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"put":{"summary":"Upsert a per-locale variant","description":"Idempotent on `(templateId, locale)`. The variant inherits the parent template's key + active flag.","tags":["EmailTemplates"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertEmailTemplateVariantInput"},"examples":{"spanish":{"summary":"Spanish localization","value":{"subject":"{{actorName}} te asignó \"{{taskTitle}}\"","bodyHtml":"<p>Hola {{firstName}}, tienes una tarea nueva.</p>","bodyText":"Hola {{firstName}}, tienes una tarea nueva."}}}}}},"responses":{"200":{"description":"Created or replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateVariant"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Delete a per-locale variant","tags":["EmailTemplates"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"204":{"description":"Deleted"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/feedback":{"get":{"summary":"List feedback submissions across all tenants (super admin)","description":"Cross-tenant triage queue. Supports the same filter shape as the per-tenant `/v1/feedback` list. Items ordered most-recent first, capped at `limit` (1..200).","tags":["SuperAdmin","Feedback"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FeedbackStatus"}},{"name":"triageStatus","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FeedbackTriageStatus"}},{"name":"category","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FeedbackCategory"}},{"name":"priority","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FeedbackPriority"}},{"name":"productArea","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FeedbackProductArea"}},{"name":"impact","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FeedbackImpact"}},{"name":"assignedToUserId","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackListResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/feedback/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one feedback submission (super admin)","tags":["SuperAdmin","Feedback"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSubmissionRow"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update triage state of a feedback submission","description":"PATCH semantics merge non-null fields; supply `assignedToUserId: null` or `internalNote: null` to clear. At least one field is required.","tags":["SuperAdmin","Feedback"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackTriagePatchInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSubmissionRow"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/themes":{"get":{"summary":"List the calling tenant's themes","tags":["Themes"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeListResponse"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/themes/import-pack":{"post":{"summary":"Import a BrandPack JSON blob as a new theme","tags":["Themes"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeImportPackInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeListItem"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/themes/marketplace":{"post":{"summary":"List shared themes across tenants (marketplace catalog)","description":"Body-shaped GET because the marketplace filter set may grow; today it accepts free-text `q` and `limit`.","tags":["Themes"],"x-ratelimit-class":"write","x-required-scopes":["profile:read"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeMarketplaceQuery"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeListResponse"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/themes/{id}/publish":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Publish (share) or unpublish a theme","tags":["Themes"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemePublishInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeListItem"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/themes/{id}/adopt":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Deep-copy a published theme into the calling tenant","tags":["Themes"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeListItem"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/marketplace/revenue/summary":{"get":{"summary":"Read cross-tenant marketplace revenue summary (super admin)","description":"Lifetime gross, current-month MRR, ARR (MRR x 12), top-10 tenants by spend, and a 30-day daily revenue trend.","tags":["SuperAdmin","Marketplace"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceRevenueSummary"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/marketplace/dashboard":{"get":{"summary":"Cross-tenant marketplace install + usage funnel (super admin)","description":"Returns installs by connector (with 30d delta + active-tenant count), top usage by event volume (24h / 7d), and connectors with auth failures in the last 24h plus a representative sample error.","tags":["SuperAdmin","Marketplace"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceDashboardSummary"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/apps":{"get":{"summary":"List the public marketplace app catalog","description":"Public, unauthenticated read of the curated catalog. Returns a bare JSON array (no `{ items }` wrapper).","tags":["Marketplace"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceAppCatalogEntry"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/installs":{"get":{"summary":"List the calling tenant's marketplace app installs","tags":["Marketplace"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceInstallRow"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Install an app for the calling tenant","description":"Idempotent upsert; returns HTTP 200 even on re-install. When `scopesGranted` is supplied the scoped install flow records the explicit grants.","tags":["Marketplace"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceInstallRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceInstallResponse"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/installs/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Uninstall an app from the calling tenant","description":"Idempotent; a double-uninstall returns 204 (never 404).","tags":["Marketplace"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"204":{"description":"Uninstalled"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/submit":{"post":{"summary":"Create a draft marketplace app from a manifest","tags":["Marketplace"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceSubmitDraftInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceSubmitDraftResponse"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/apps/{id}/manifest":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Replace the draft manifest for one app","tags":["Marketplace"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceUpdateManifestInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceAppRow"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/apps/{id}/submit-for-review":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Submit a draft app for moderator review","tags":["Marketplace"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["submissionId"],"properties":{"submissionId":{"type":"string"}}}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/developer/apps":{"get":{"summary":"List the calling developer's marketplace apps","tags":["Marketplace"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"vendorTenantId","in":"query","required":true,"schema":{"type":"string","enum":["mine"]},"description":"Only the literal `mine` is supported today."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceAppRow"}}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/developer/apps/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one of the calling developer's marketplace apps","tags":["Marketplace"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceAppRow"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/developer/apps/{id}/submissions":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List the review history (submissions) for one developer app","tags":["Marketplace"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceSubmissionRow"}}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/admin/queue":{"get":{"summary":"List the marketplace moderation queue (admin)","tags":["Marketplace","SuperAdmin"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MarketplacePublishStatus"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceQueueResponse"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/admin/apps/{id}/approve":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Approve a submitted marketplace app","tags":["Marketplace","SuperAdmin"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceReviewNotesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceAppRow"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/admin/apps/{id}/reject":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Reject a submitted marketplace app","tags":["Marketplace","SuperAdmin"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceReasonInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceAppRow"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/admin/apps/{id}/request-changes":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Send a submitted app back to the developer for changes","tags":["Marketplace","SuperAdmin"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceReviewNotesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceAppRow"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/admin/apps/{id}/suspend":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Suspend a published marketplace app","tags":["Marketplace","SuperAdmin"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceReasonInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceAppRow"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/marketplace/admin/revenue":{"get":{"summary":"List per-tenant marketplace revenue for one calendar month (admin)","tags":["Marketplace","SuperAdmin"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"month","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"description":"Calendar month in `YYYY-MM` format."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceRevenueRow"}}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/anomalies":{"get":{"summary":"List cross-tenant anomaly alerts (super admin)","description":"Returns the open/acknowledged/resolved anomaly alerts the nightly sweep has emitted. Filter by signal, severity, status, or a `since` timestamp.","tags":["SuperAdmin","Anomalies"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AnomalyAlertStatus"}},{"name":"signal","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"severity","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AnomalyAlertSeverity"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyListResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/anomalies/{id}/ack":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Acknowledge an anomaly alert (super admin)","tags":["SuperAdmin","Anomalies"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyAckInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyAlert"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/anomalies/{id}/resolve":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Resolve an anomaly alert (super admin)","tags":["SuperAdmin","Anomalies"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyResolveInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyAlert"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/audit-mirror/status":{"get":{"summary":"Read the audit-log mirror sweep health (super admin)","description":"Returns the bucket configuration, lag (seconds since last succeeded run), counts of failing tenants, and the most recent per-tenant run rows.","tags":["SuperAdmin","AuditMirror"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditMirrorStatusResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/audit-mirror/replay/{tenantId}":{"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Force a mirror sweep for one tenant (super admin)","description":"Synchronously kicks off a sweep so the operator does not have to wait for the next 10-minute tick. Returns the resulting run summary.","tags":["SuperAdmin","AuditMirror"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditMirrorReplayResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/controls":{"get":{"summary":"List compliance controls (admin)","tags":["Compliance"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"framework","in":"query","required":false,"schema":{"type":"string","enum":["SOC2","ISO27001","HIPAA","GDPR"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceControlsResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/evidence":{"get":{"summary":"List the latest evidence rows per control (admin)","tags":["Compliance"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"controlId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceEvidenceListResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/evidence-vault":{"get":{"summary":"Read the tenant evidence-vault summary (admin)","description":"Aggregated read across every evidence source the tenant has access to: per-source item counts + latest timestamps, evidence pack lifecycle counts, open findings, and the role x source permission matrix.","tags":["Compliance","EvidenceVault"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceVaultView"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/collect":{"post":{"summary":"Force a re-collection of all compliance evidence (admin)","tags":["Compliance"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceForceCollectResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/findings":{"get":{"summary":"List compliance findings (admin)","tags":["Compliance"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","remediating","resolved","accepted-risk"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceFindingsResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/findings/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update one compliance finding (admin)","tags":["Compliance"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceFindingPatchInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceFindingView"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/packs":{"get":{"summary":"List compliance evidence packs the tenant has queued (admin)","tags":["Compliance"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompliancePacksResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Queue a new compliance evidence pack build (admin)","tags":["Compliance"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompliancePackQueueInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompliancePackView"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/packs/{id}/download":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a short-lived download URL for one evidence pack (admin)","tags":["Compliance"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompliancePackDownloadResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/evidence-packs":{"get":{"summary":"List compliance evidence pack jobs (super admin)","tags":["Compliance","SuperAdmin"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePackJobsResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Enqueue a new compliance evidence pack job (super admin)","tags":["Compliance","SuperAdmin"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePackRequestInput"}}}},"responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePackRequestResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/compliance/evidence-packs/{jobId}":{"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one compliance evidence pack job (super admin)","tags":["Compliance","SuperAdmin"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePackJobView"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/rate-limit-tiers/me":{"get":{"summary":"Read the caller's rate-limit tier, buckets, and rolling usage","description":"Powers the `/settings/api-access` page. Returns the tier resolved from the tenant's billing plan, the per-class buckets, the full tier catalog for the comparison table, and a 60-minute rolling usage histogram for `read | write | ai`.","tags":["RateLimits"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitCurrentTierView"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tenant/branding":{"get":{"summary":"Read the calling tenant's workspace branding","tags":["TenantBranding"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWorkspaceBrandingView"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"put":{"summary":"Update workspace branding (display name, logo, brand colour)","description":"OWNER / ADMIN only. PUT is idempotent: empty string clears a field; omitting a field preserves the prior value.","tags":["TenantBranding"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWorkspaceBrandingPutInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWorkspaceBrandingView"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/walkthroughs/state":{"get":{"summary":"List the caller's completed walkthroughs","description":"The walkthrough runner consults this on mount to skip any walkthrough the user has already finished.","tags":["Walkthroughs"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalkthroughStateResponse"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/walkthroughs/{id}/complete":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"}}],"post":{"summary":"Mark one walkthrough as completed for the caller (idempotent)","tags":["Walkthroughs"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalkthroughCompletion"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/incidents":{"get":{"summary":"List status-page incidents across all tenants (super admin)","tags":["SuperAdmin","StatusIncidents"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"platform","in":"query","required":false,"schema":{"type":"boolean"},"description":"When true, restrict to incidents with no tenantId (platform-wide)."},{"name":"includeResolved","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIncidentListResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Open a new status incident (super admin)","tags":["SuperAdmin","StatusIncidents"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIncidentCreateInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIncidentResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/incidents/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one status incident (super admin)","tags":["SuperAdmin","StatusIncidents"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIncidentResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Edit one status incident (super admin)","tags":["SuperAdmin","StatusIncidents"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIncidentUpdateInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIncidentResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/incidents/{id}/resolve":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Resolve one status incident (super admin)","description":"Records `resolvedAt` server-side and emits a dedicated `incident.resolve` audit event so the action is distinct in the trail.","tags":["SuperAdmin","StatusIncidents"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIncidentResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/status/incidents-timeline":{"get":{"summary":"Public status-page incident timeline","description":"Last N days (default 30, clamped to [1, 365]) of incidents - either platform-wide or scoped to one tenant. No auth.","tags":["StatusIncidents"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"platform","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"windowDays","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIncidentListResponse"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/data-export/start":{"post":{"summary":"Start a tenant data export job (OWNER / ADMIN only)","description":"Enqueues a background job that gzips every tenant-scoped table into a single archive plus a manifest. Returns the new jobId immediately; poll `/v1/me/data-export/jobs/{id}` until status is `ready`.","tags":["DataExport"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportStartResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/data-export/jobs":{"get":{"summary":"List the caller's tenant data export jobs","tags":["DataExport"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportJobListResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/data-export/jobs/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one tenant data export job","tags":["DataExport"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportJobView"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/data-export/jobs/{id}/download":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Mint a short-lived download URL for one tenant data export artifact","tags":["DataExport"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportDownloadResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"410":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/wiki/pages":{"get":{"summary":"List knowledge base pages","tags":["KnowledgeBase"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"parentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"ownerUserId","in":"query","required":false,"schema":{"type":"string"}},{"name":"isPublished","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"tagSlug","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPageListResponse"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Create a knowledge base page","tags":["KnowledgeBase"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPageCreateInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/wiki/search":{"get":{"summary":"Full-text search across knowledge base pages","tags":["KnowledgeBase"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiSearchResponse"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/wiki/graph":{"get":{"summary":"Get the knowledge base page parent/child graph","tags":["KnowledgeBase"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"rootId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiGraphResponse"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/wiki/pages/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one knowledge base page with comments","tags":["KnowledgeBase"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPageDetail"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update a knowledge base page","tags":["KnowledgeBase"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPageUpdateInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Delete a knowledge base page","tags":["KnowledgeBase"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPageDeleteResponse"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/wiki/pages/{id}/publish":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Toggle the publish flag for a knowledge base page","tags":["KnowledgeBase"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPagePublishInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/wiki/pages/{id}/comments":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Post a comment on a knowledge base page","tags":["KnowledgeBase"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiCommentCreateInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiComment"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/wiki/pages/{id}/tags":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Replace the tag set on a knowledge base page","tags":["KnowledgeBase"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiTagsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPage"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai-observability/summary":{"get":{"summary":"Read AI observability KPI tiles for the last 24 hours (super admin)","tags":["AiObservability","SuperAdmin"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiObservabilitySummary"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai-observability/providers":{"get":{"summary":"Read per-provider AI tiles (super admin)","tags":["AiObservability","SuperAdmin"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiObservabilityProvidersResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai-observability/traces":{"get":{"summary":"Read recent AI attempt traces (super admin)","tags":["AiObservability","SuperAdmin"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiObservabilityTracesResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/webhook-deliveries/{id}/retry":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Replay a webhook delivery from the retry / dead-letter inbox","description":"Enqueues a fresh delivery row that the webhook-delivery worker picks up on its next tick. The original row is preserved for audit.","tags":["Webhooks"],"x-ratelimit-class":"write","x-required-scopes":["webhooks:manage"],"responses":{"202":{"description":"Accepted - replay is queued."},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/admin/webhooks/deliveries":{"get":{"summary":"Per-tenant webhook delivery dashboard","description":"Richer than `/v1/webhook-deliveries`: supports filtering by `webhookId`, lifecycle `status`, and an `[fromTs, toTs]` time window so the dashboard can show \"last hour\", \"last 24h\", etc. Cursor-paginated.","tags":["Webhooks"],"x-ratelimit-class":"read","x-required-scopes":["webhooks:manage"],"parameters":[{"name":"webhookId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","sending","success","failed","dead"]}},{"name":"fromTs","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"toTs","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminWebhookDelivery"}},"nextCursor":{"type":"string","nullable":true}}}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/admin/webhooks/deliveries/{id}/payload":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read the full request + response capture for one delivery","description":"Bodies may be truncated to 64 KiB; the `bodyTruncated` flags indicate when that happened.","tags":["Webhooks"],"x-ratelimit-class":"read","x-required-scopes":["webhooks:manage"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWebhookDeliveryPayload"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/admin/webhooks/deliveries/{id}/retry":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Re-queue a delivery from the admin dashboard","description":"Creates a NEW delivery row; the original is preserved for audit. Returns 202 immediately - the worker picks it up on the next tick.","tags":["Webhooks"],"x-ratelimit-class":"write","x-required-scopes":["webhooks:manage"],"responses":{"202":{"description":"Accepted - retry queued","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"retryDeliveryId":{"type":"string","nullable":true}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications":{"get":{"summary":"List inbox notifications for the calling user","description":"Cursor-paginated, newest first. Filter by `status` (unread / read / archived / all / everything), by event `kinds`, by `projectId`, by `actorId`, by free-text `q`, or by a time window (`since` / `before`). Legacy `unreadOnly=true` is preserved as a shortcut for `status=unread`. Response carries the live unread count + a 4-bucket summary for the FE header.","tags":["Notifications"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["unread","read","archived","all","everything"]}},{"name":"unreadOnly","in":"query","required":false,"schema":{"type":"boolean"},"description":"Legacy alias for `status=unread`."},{"name":"kinds","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of notification kinds."},{"name":"projectId","in":"query","required":false,"schema":{"type":"string"}},{"name":"actorId","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationListResponse"},"example":{"items":[{"id":"ntf_01HW3T2K8X9Y2VPRZGQX9NDY40","kind":"comment.mention","title":"Priya mentioned you","body":"@you can you review the launch checklist?","link":"/tasks/tsk_01HW3T2K8X9Y2VPRZGQX9NDY1B","context":{"taskId":"tsk_01HW3T2K8X9Y2VPRZGQX9NDY1B","authorId":"usr_01HW3T2K8X9Y2VPRZGQX9NDY10"},"readAt":null,"archivedAt":null,"snoozedUntil":null,"createdAt":"2026-06-06T17:00:00Z"}],"nextCursor":null,"unread":1,"summary":{"total":12,"unread":1,"archived":3,"snoozed":0}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/digest":{"get":{"summary":"Read the daily-digest preview","tags":["Notifications"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationDigest"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/snooze-presets":{"get":{"summary":"Five named snooze presets resolved to concrete future wake timestamps","description":"Privacy-safe: only `{ id, label, wakeAt }` is returned.","tags":["Notifications"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SnoozePreset"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/preferences":{"get":{"summary":"Read notification preferences for the calling user","tags":["Notifications"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update notification preferences (merge semantics)","description":"PATCH semantics: undefined fields are left untouched. Sub-objects (`kinds`, `channels`) merge per-key, so a request like `{ \"channels\": { \"push\": false } }` only flips the push toggle.","tags":["Notifications"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"},"examples":{"disablePush":{"summary":"Mute push, keep in-app + email","value":{"channels":{"push":false}}},"quietHours":{"summary":"Set quiet hours","value":{"quietHours":{"start":"22:00","end":"07:00","tz":"America/Los_Angeles"}}},"muteKind":{"summary":"Mute one notification kind, mentions-only on another","value":{"kinds":{"goal.due-soon":"none","comment.mention":"mentions_only"}}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/{id}/read":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Mark a notification as read","tags":["Notifications"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/{id}/unread":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Mark a notification as unread","tags":["Notifications"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/{id}/archive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Archive a notification (removes it from the live inbox)","tags":["Notifications"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/{id}/unarchive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Unarchive a notification (restore to the live inbox)","tags":["Notifications"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/{id}/snooze":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Snooze a notification until a specified time","tags":["Notifications"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnoozeNotificationInput"},"examples":{"tomorrow":{"summary":"Snooze until tomorrow morning","value":{"until":"2026-06-07T09:00:00-07:00"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/read-all":{"post":{"summary":"Mark every live notification as read","tags":["Notifications"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"204":{"description":"OK"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/notifications/archive-all-read":{"post":{"summary":"Archive every notification that has been read","tags":["Notifications"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["count"],"properties":{"count":{"type":"integer","minimum":0}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/push/subscriptions":{"get":{"summary":"List active push subscriptions for the calling user","description":"Returns one row per device. Endpoints are digested (SHA-256 prefix) so the raw push URL never leaves the server.","tags":["Push"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PushSubscription"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/push/subscribe":{"post":{"summary":"Register a Web Push or Expo push subscription","description":"Discriminated by `platform`. WEB requires `endpoint` + `keys.{p256dh,auth}` (VAPID). EXPO requires `token` (or `endpoint` as alias) carrying the Expo push token. Idempotent on (`userId`, `endpoint`).","tags":["Push"],"x-ratelimit-class":"write","x-required-scopes":["profile:read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscribeInput"},"examples":{"web":{"summary":"Web Push (browser Service Worker)","value":{"platform":"WEB","endpoint":"https://fcm.googleapis.com/fcm/send/AAAA...","keys":{"p256dh":"BJ8...long-base64...","auth":"ABCD...short..."},"deviceLabel":"iPhone 15 - Safari"}},"expo":{"summary":"Expo Push (React Native)","value":{"platform":"EXPO","token":"ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]","deviceLabel":"Pixel 8 - Atlas Mobile"}}}}}},"responses":{"201":{"description":"Registered","content":{"application/json":{"schema":{"type":"object","required":["id","platform"],"properties":{"id":{"type":"string"},"platform":{"type":"string","enum":["WEB","EXPO"]}}}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Unsubscribe a device by endpoint","tags":["Push"],"x-ratelimit-class":"write","x-required-scopes":["profile:read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["endpoint"],"properties":{"endpoint":{"type":"string","minLength":1,"maxLength":2048}}}}}},"responses":{"204":{"description":"Unsubscribed"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/push/receipts":{"post":{"summary":"Report push delivery / open / tap receipts","description":"Mobile and web clients call this to confirm the OS handed the push to the app (`delivered`), the user saw it (`opened`), or the user tapped it (`tapped`). Powers the `/v1/super-admin/push/delivery-summary` open-rate / tap-rate dashboard.","tags":["Push"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["messageId","event"],"properties":{"messageId":{"type":"string","minLength":1,"maxLength":120,"description":"NotificationDelivery.id from the push data payload."},"event":{"type":"string","enum":["delivered","opened","tapped"]},"providerMessageId":{"type":"string","minLength":1,"maxLength":240},"providerResponse":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"Recorded","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/super-admin/push/delivery-summary":{"get":{"summary":"Cross-tenant push delivery / open / tap aggregates (super admin)","tags":["Push","SuperAdmin"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"windowDays","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":90,"default":7}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["windowDays","totals","providers"],"properties":{"windowDays":{"type":"integer"},"totals":{"type":"object","required":["attempted","delivered","opened","tapped","deliveryRate"],"properties":{"attempted":{"type":"integer"},"delivered":{"type":"integer"},"opened":{"type":"integer"},"tapped":{"type":"integer"},"deliveryRate":{"type":"number","minimum":0,"maximum":1}}},"providers":{"type":"array","items":{"type":"object","required":["provider","attempted","delivered","opened","tapped","deliveryRate","openRate","tapRate"],"properties":{"provider":{"type":"string","example":"expo"},"attempted":{"type":"integer"},"delivered":{"type":"integer"},"opened":{"type":"integer"},"tapped":{"type":"integer"},"deliveryRate":{"type":"number"},"openRate":{"type":"number"},"tapRate":{"type":"number"}}}}}}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/catalog":{"get":{"summary":"List available integrations (Slack, GitHub, Microsoft, Linear, Gmail, calendars, SSO, ...)","description":"Aggregate state across the tenant: each entry shows whether the integration is `available`, `connected`, `requires-setup`, or `unavailable` in the current environment.","tags":["Integrations"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsCatalogResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/slack":{"get":{"summary":"List Slack installations for the calling tenant","tags":["Slack","Integrations"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SlackInstallation"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/slack/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update a Slack installation (default channel)","tags":["Slack","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSlackInstallationInput"},"examples":{"setDefault":{"summary":"Set the default announcement channel","value":{"defaultChannelId":"C0123456789"}},"clearDefault":{"summary":"Clear the default channel","value":{"defaultChannelId":null}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackInstallation"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Uninstall the Slack app for this tenant","tags":["Slack","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"204":{"description":"Uninstalled"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/github":{"get":{"summary":"List GitHub App installations for the calling tenant","tags":["GitHub","Integrations"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GitHubInstallation"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/github/install-url":{"get":{"summary":"Return the GitHub App install URL (carries OAuth state)","tags":["GitHub","Integrations"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"503":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/github/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Disable a GitHub installation","tags":["GitHub","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"204":{"description":"Disabled"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/github/tasks/{taskId}/links":{"parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List GitHub issue / PR links for a task","tags":["GitHub","Integrations"],"x-ratelimit-class":"read","x-required-scopes":["tasks:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GitHubLink"}}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Link a GitHub issue or PR to a task","tags":["GitHub","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGitHubLinkInput"},"examples":{"issue":{"summary":"Link an issue","value":{"url":"https://github.com/acme-eng/atlas/issues/42"}},"pr":{"summary":"Link a PR","value":{"url":"https://github.com/acme-eng/atlas/pull/77"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubLink"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/github/tasks/{taskId}/links/{linkId}":{"parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Remove a GitHub link from a task","tags":["GitHub","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"responses":{"204":{"description":"Removed"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/microsoft/status":{"get":{"summary":"Read the Microsoft 365 connection status for the calling tenant","tags":["Microsoft","Integrations"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["connected"],"properties":{"connected":{"type":"boolean"},"tenantDomain":{"type":"string","nullable":true},"lastSyncedAt":{"type":"string","format":"date-time","nullable":true},"scopes":{"type":"array","items":{"type":"string"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/microsoft/connect":{"post":{"summary":"Initiate the Microsoft OAuth connect flow","tags":["Microsoft","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["redirectUrl"],"properties":{"redirectUrl":{"type":"string","format":"uri"}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"503":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/microsoft/disconnect":{"post":{"summary":"Disconnect the Microsoft 365 integration","tags":["Microsoft","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"204":{"description":"Disconnected"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/microsoft/sync-now":{"post":{"summary":"Force a synchronous Microsoft 365 sync (best-effort)","tags":["Microsoft","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"202":{"description":"Accepted - sync queued"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/linear/status":{"get":{"summary":"Read the Linear connection status for the calling tenant","tags":["Linear","Integrations"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["connected"],"properties":{"connected":{"type":"boolean"},"workspaceName":{"type":"string","nullable":true},"lastSyncedAt":{"type":"string","format":"date-time","nullable":true}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/linear/connect":{"post":{"summary":"Initiate the Linear OAuth connect flow","tags":["Linear","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["redirectUrl"],"properties":{"redirectUrl":{"type":"string","format":"uri"}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"503":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/linear/disconnect":{"post":{"summary":"Disconnect the Linear integration","tags":["Linear","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"204":{"description":"Disconnected"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/linear/sync-now":{"post":{"summary":"Force a Linear sync (best-effort)","tags":["Linear","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"202":{"description":"Accepted - sync queued"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/gmail/me":{"get":{"summary":"Read the calling user's Gmail connection","tags":["Gmail","Integrations"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["connected"],"properties":{"connected":{"type":"boolean"},"emailAddress":{"type":"string","format":"email","nullable":true},"historyId":{"type":"string","nullable":true},"watchExpiresAt":{"type":"string","format":"date-time","nullable":true}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update the calling user's Gmail connection settings","tags":["Gmail","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"syncEnabled":{"type":"boolean"},"syncLabels":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Disconnect the calling user's Gmail account","tags":["Gmail","Integrations"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"204":{"description":"Disconnected"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/settings/sso":{"get":{"summary":"Read the calling tenant's SAML connection (admin)","description":"Returns `{ configured: false }` when no SAML connection is set up; otherwise returns the public SAML row (no private key, only the cert fingerprint).","tags":["Sso"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SamlConnection"},{"type":"object","required":["configured"],"properties":{"configured":{"type":"boolean","enum":[false]}}}]}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"put":{"summary":"Upsert the calling tenant's SAML connection (admin)","description":"Either provide `idpMetadataXml` (Atlas parses it and back-fills the explicit fields) OR provide `entityId`, `ssoUrl`, and `x509Cert` directly. On UPDATE you can patch any subset; the service enforces required fields on the first create.","tags":["Sso"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamlUpsertInput"},"examples":{"metadata":{"summary":"Bootstrap from IdP metadata XML","value":{"idpMetadataXml":"<EntityDescriptor entityID=\"https://idp.example.com/metadata\">...</EntityDescriptor>","provisioningMode":"AUTO_PROVISION"}},"explicit":{"summary":"Bootstrap from explicit fields","value":{"entityId":"https://idp.example.com/metadata","ssoUrl":"https://idp.example.com/sso/saml","x509Cert":"-----BEGIN CERTIFICATE-----\nMIID...==\n-----END CERTIFICATE-----","wantAssertionsEncrypted":true}},"toggle":{"summary":"Toggle want-assertions-encrypted on an existing connection","value":{"wantAssertionsEncrypted":false}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamlConnection"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Disable the SAML connection (soft-disable; preserves config)","tags":["Sso"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"204":{"description":"Disabled"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/settings/sso/test":{"post":{"summary":"Dry-run verify a sample SAMLResponse against the tenant's connection","description":"Useful for diagnosing assertion-mapping issues without going through a full browser login. The response carries the parsed attributes, NameID, and (if present) signature verification result.","tags":["Sso"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamlTestInput"}}}},"responses":{"200":{"description":"Verified","content":{"application/json":{"schema":{"type":"object","required":["ok","assertion"],"properties":{"ok":{"type":"boolean"},"assertion":{"$ref":"#/components/schemas/SamlVerifiedAssertion"}}}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/sso/{tenantSlug}/metadata":{"parameters":[{"name":"tenantSlug","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$","maxLength":80}}],"get":{"summary":"SP metadata XML for IdP import (public)","tags":["Sso"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/samlmetadata+xml":{"schema":{"type":"string"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/sso/{tenantSlug}/login":{"parameters":[{"name":"tenantSlug","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$","maxLength":80}},{"name":"relayState","in":"query","required":false,"schema":{"type":"string","maxLength":2048}}],"get":{"summary":"IdP-initiated entry (302 to the IdP with deflate+base64 AuthnRequest)","tags":["Sso"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"302":{"description":"Redirect to IdP"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"503":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/sso/{tenantSlug}/acs":{"parameters":[{"name":"tenantSlug","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$","maxLength":80}}],"post":{"summary":"Assertion Consumer Service (302 to app after refresh-cookie set)","tags":["Sso"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["SAMLResponse"],"properties":{"SAMLResponse":{"type":"string"},"RelayState":{"type":"string","maxLength":2048}}}}}},"responses":{"302":{"description":"Login successful - redirected with refresh cookie"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/sso/{tenantSlug}/slo":{"parameters":[{"name":"tenantSlug","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$","maxLength":80}},{"name":"SAMLRequest","in":"query","required":false,"schema":{"type":"string"}},{"name":"RelayState","in":"query","required":false,"schema":{"type":"string","maxLength":2048}}],"get":{"summary":"Single Logout - best-effort, always redirects to signed-out page","tags":["Sso"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"302":{"description":"Redirect to signed-out page"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/admin/sso/saml/{id}/attribute-map":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"patch":{"summary":"Replace the SAML attribute → user-column map (super admin only)","description":"Locked behind the SuperAdmin guard so a tenant ADMIN cannot edit attribute mappings on their own connection. Unknown atlas fields in the supplied map are silently dropped against the writable-column allowlist.","tags":["Sso","SuperAdmin"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamlAttributeMapPatchInput"},"examples":{"basic":{"summary":"Map IdP department + title attributes","value":{"attributeMap":{"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/department":"department","jobTitle":"jobTitle"}}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamlConnection"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/admin/sso/saml/{id}/group-role-map":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"patch":{"summary":"Replace the SAML group → Atlas role map (super admin only)","description":"Locked behind the SuperAdmin guard - this map can grant OWNER on a tenant, so a tenant ADMIN must NEVER be able to edit it on their own connection.","tags":["Sso","SuperAdmin"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamlGroupRoleMapPatchInput"},"examples":{"basic":{"summary":"Map Okta groups to Atlas roles","value":{"groupRoleMap":{"okta-atlas-owners":"OWNER","okta-atlas-admins":"ADMIN","okta-atlas-members":"MEMBER"}}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamlConnection"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/focus-coaching/suggestions":{"get":{"summary":"Read 0-3 short focus / productivity coaching cards for the calling user","description":"Computed from the caller's habits, goals, tasks, and recent focus sessions. Pure read; nothing is persisted.","tags":["FocusCoaching"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK"},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/{id}/transition":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Perform a workflow transition on a task","description":"Runs the transition identified by `transitionId`. The server validates that the transition is allowed from the current status under the task's workflow, runs any pre/post conditions, and atomically updates `status` + `statusId` + `version`.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformTransitionInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/board":{"get":{"summary":"Read a kanban board view (columns + tasks per column)","description":"Returns one column per workflow status on the supplied `boardId`. Each column carries up to `limitPerColumn` tasks (default 50, max 200). Use `hasMore` / per-column pagination to walk further.","tags":["Tasks"],"x-ratelimit-class":"read","x-required-scopes":["tasks:read"],"parameters":[{"name":"boardId","in":"query","required":true,"schema":{"type":"string"}},{"name":"limitPerColumn","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardViewResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/{id}/snooze":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Snooze a task until a future time (or clear with null)","description":"Sets `snoozedUntil` on the task. The task is hidden from default list views until the time elapses. Pass `until: null` to clear an existing snooze.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnoozeTaskInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/{id}/archive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Archive a task","description":"Sets `archivedAt`; the task is hidden from default views but the row is retained. Reverse with `POST /v1/tasks/{id}/restore`.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/{id}/restore":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Restore an archived or soft-deleted task","description":"Clears `archivedAt` / `deletedAt`. Idempotent.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/{id}/reminders":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List reminders attached to a task","tags":["Tasks"],"x-ratelimit-class":"read","x-required-scopes":["tasks:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TaskReminderRow"}}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/{taskId}/labels/{labelId}":{"parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}},{"name":"labelId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Attach a label to a task","description":"Idempotent - re-attaching an existing link returns 200.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskLabelLink"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Detach a label from a task","description":"Idempotent - 204 even if the link did not exist.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"responses":{"204":{"description":"Detached"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/import":{"post":{"summary":"Bulk-import up to 500 tasks into a project","description":"Each row is validated independently; valid rows are created, invalid rows are reported in `errors[]` by index. Cap is 500 rows per call to keep the API hot.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTasksInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTasksResponse"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/auto-schedule":{"post":{"summary":"Compute auto-schedule proposals (and optionally apply them)","description":"`dryRun: true` (default) returns proposals without persisting. `dryRun: false` applies them inside a transaction; clients should always present the proposals to the user first.","tags":["Tasks"],"x-ratelimit-class":"ai","x-required-scopes":["tasks:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoScheduleInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoScheduleResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/tasks/recurring-preview":{"post":{"summary":"Expand an RRULE between two dates without persisting","description":"Returns the list of occurrence dates the rule generates inside `[from, to]`. Pure compute; nothing is written.","tags":["Tasks"],"x-ratelimit-class":"read","x-required-scopes":["tasks:read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringPreviewInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringPreviewResponse"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/task-templates":{"get":{"summary":"List task templates","tags":["Tasks"],"x-ratelimit-class":"read","x-required-scopes":["tasks:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TaskTemplate"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Create a task template","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskTemplateInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplate"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/task-templates/{id}/apply":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Materialise a task template as a real task in a project","description":"Loads the saved payload, merges in any caller `overrides`, then creates a new task.","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyTaskTemplateInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/task-templates/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete a task template","tags":["Tasks"],"x-ratelimit-class":"write","x-required-scopes":["tasks:write"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects":{"get":{"summary":"List projects","description":"Cursor-paginated. Filters: `teamId`, `status`, `includeArchived`. Default page size 50, max 100.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"parameters":[{"name":"teamId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ProjectStatus"}},{"name":"includeArchived","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListResponse"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Create a project","description":"Minimal body is `{ teamId, name }`; everything else has a server default. Status defaults to `PLANNED`, owner to the caller.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":256}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"401":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a project","description":"Returns 404 if archived or owned by a different tenant - never leaks cross-tenant existence.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update a project (optimistic concurrency)","description":"Partial body. Send `If-Match: <version>` or `version` in the body to enable optimistic concurrency - a stale version returns 409 instead of overwriting newer state.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"parameters":[{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Soft-delete a project","description":"Sets `deletedAt`; the row stops appearing in list / search. Tasks inside the project are unaffected. Idempotent.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/archive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Archive a project","description":"Sets `archivedAt`; the project disappears from default list views but its data is retained.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/restore":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Restore an archived project","description":"Clears `archivedAt`. Idempotent.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/transfer":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Transfer project ownership to another user","description":"Audits the old/new owner pair. Caller must be the current owner or have admin permissions.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferProjectInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/summary-counts":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read aggregate task counters for a project","description":"Total / done / in-progress / overdue counts + a progress percentage. O(1) - backed by a counters table.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSummaryCounts"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/milestone-rollup":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read milestone rollup for a project","description":"Aggregates milestone counts by status, surfaces the nearest upcoming due date, and flags at-risk milestones.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["projectId","milestones"],"properties":{"projectId":{"type":"string"},"milestones":{"type":"array","items":{"$ref":"#/components/schemas/ProjectMilestone"}},"nextDueAt":{"type":"string","format":"date-time","nullable":true},"atRiskCount":{"type":"integer","minimum":0}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/project-milestones":{"get":{"summary":"List milestones across all projects (filter by projectId)","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MilestoneStatus"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProjectMilestone"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Create a project milestone","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectMilestoneInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectMilestone"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/project-milestones/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a single milestone","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectMilestone"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update a milestone","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectMilestoneInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectMilestone"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Delete a milestone","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{projectId}/baselines":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List baselines (point-in-time snapshots) for a project","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProjectBaseline"}}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Capture a new baseline snapshot","description":"Snapshots every task's current schedule + status. Used later via the delta endpoint to compute slippage.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectBaselineInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBaseline"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{projectId}/baselines/{baselineId}":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"baselineId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a single baseline","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBaseline"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Delete a baseline","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{projectId}/baselines/{baselineId}/delta":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"baselineId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Compute slippage delta against a baseline","description":"For each task, returns baseline vs current schedule and a per-row `slippedDays` integer. Summarises on-time / slipped / added / removed counts.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBaselineDelta"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/templates/starters":{"get":{"summary":"List system-shipped starter project templates","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProjectTemplate"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/save-as-template":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Save a project as a reusable template","description":"Snapshots the project + its tasks + milestones into a template the tenant can later instantiate.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveProjectAsTemplateInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTemplate"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/from-template":{"post":{"summary":"Create a new project from a template","description":"Instantiates a project + tasks + milestones from a saved template. Optional `startsOn` shifts all dates by the same delta.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFromTemplateInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{projectId}/workflows":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List status workflows for a project","tags":["Workflows"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Workflow"}}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Create a workflow under a project","tags":["Workflows"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{projectId}/workflows/by-key/{key}":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,38}$"}}],"get":{"summary":"Read a workflow by its project-unique key","tags":["Workflows"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{projectId}/workflows/{id}":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a workflow","tags":["Workflows"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update a workflow (optimistic concurrency)","tags":["Workflows"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Delete a workflow","tags":["Workflows"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{projectId}/workflows/{id}/statuses":{"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List status assignments for a workflow","tags":["Workflows"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["assignments"],"properties":{"assignments":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowStatusAssignment"}}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"put":{"summary":"Atomically replace the workflow's status-set","description":"Exactly one assignment must have `isInitial: true` (server returns 422 otherwise).","tags":["Workflows"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetWorkflowStatusesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["assignments"],"properties":{"assignments":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowStatusAssignment"}}}}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/workflows/{id}/runs":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List workflow runs for a workflow","tags":["Workflows"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","running","completed","failed","cancelled"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRun"}},"nextCursor":{"type":"string","nullable":true}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/workflows/runs/{runId}/steps":{"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List steps for a workflow run","tags":["Workflows"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowStep"}}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/templates":{"get":{"summary":"List agent templates available to the tenant","tags":["Agents"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentTemplate"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/templates/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update governance metadata for an agent template","description":"`reason` is mandatory and captured in the audit log alongside the disabled / cost-cap change.","tags":["Agents"],"x-ratelimit-class":"write","x-required-scopes":["ai:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentTemplateGovernanceInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTemplate"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/templates/{id}/run":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Kick off a run from an agent template","description":"Returns the seeded `AgentRun`. Subscribe to its status via the activity feed or poll `GET /v1/agents/runs/{id}`.","tags":["Agents"],"x-ratelimit-class":"ai","x-required-scopes":["ai:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAgentTemplateInput"}}}},"responses":{"202":{"description":"Accepted - run queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRun"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/memory":{"get":{"summary":"List stored agent memory entries","tags":["Agents"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"parameters":[{"name":"agentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"scope","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AgentMemoryScope"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentMemoryEntry"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Store a new agent memory entry","tags":["Agents"],"x-ratelimit-class":"write","x-required-scopes":["ai:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentMemoryInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMemoryEntry"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/memory/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete an agent memory entry","tags":["Agents"],"x-ratelimit-class":"write","x-required-scopes":["ai:write"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/approvals":{"get":{"summary":"List agent approvals (filter by status / agentId)","tags":["Agents"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AgentApprovalStatus"}},{"name":"agentId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentApproval"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Open a new approval request","description":"Used by the agent runtime when it hits a guarded tool. Surfaces in the approvals queue for a human to decide.","tags":["Agents"],"x-ratelimit-class":"write","x-required-scopes":["ai:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentApprovalInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentApproval"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/replayable-approvals":{"get":{"summary":"List approvals whose original action can still be replayed verbatim","tags":["Agents"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentApproval"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/execution-readiness":{"get":{"summary":"Snapshot of whether agent execution is currently healthy","description":"Aggregates queue depth, cost ceilings, paused templates, and outstanding approvals into a single boolean + reason.","tags":["Agents"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["ready"],"properties":{"ready":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}},"queueDepth":{"type":"integer","minimum":0},"pausedTemplates":{"type":"integer","minimum":0}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/approvals/risk-posture":{"get":{"summary":"Aggregate risk posture across pending approvals","tags":["Agents"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["pendingCount"],"properties":{"pendingCount":{"type":"integer","minimum":0},"highRiskCount":{"type":"integer","minimum":0},"oldestPendingAt":{"type":"string","format":"date-time","nullable":true}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/approvals/sla-digest":{"post":{"summary":"Trigger a digest summarising approvals that have breached SLA","description":"Builds a per-tenant digest and notifies the configured channel. Returns the digest summary inline.","tags":["Agents"],"x-ratelimit-class":"write","x-required-scopes":["ai:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["notified"],"properties":{"notified":{"type":"boolean"},"breachedCount":{"type":"integer","minimum":0},"summary":{"type":"string"}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/approvals/{id}/decide":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Approve or reject an outstanding approval","description":"Sets `status` to `APPROVED` or `REJECTED`. Approvals notify the agent runtime so the original run can resume (when applicable).","tags":["Agents"],"x-ratelimit-class":"write","x-required-scopes":["ai:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideAgentApprovalInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentApproval"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/approvals/{id}/replay":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Re-execute the action attached to an approved approval","description":"Loads the captured replay envelope and re-runs the original tool call verbatim. Returns the new replay envelope (with a fresh `replayHash`).","tags":["Agents"],"x-ratelimit-class":"ai","x-required-scopes":["ai:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayAgentApprovalInput"}}}},"responses":{"202":{"description":"Replay queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentReplayEnvelope"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"409":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/agents/activity":{"get":{"summary":"Activity feed across runs / approvals / governance edits","tags":["Agents"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"parameters":[{"name":"agentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AgentRunStatus"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentActivityRow"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai/nl-capture":{"post":{"summary":"Convert a natural-language prompt into a structured task draft","description":"Returns a draft `tasks[]` array the client can confirm before calling `POST /v1/tasks`. Optional `clarifyingQuestion` is set when the model needs a follow-up.","tags":["Ai"],"x-ratelimit-class":"ai","x-required-scopes":["ai:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NlCaptureRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NlCaptureResponse"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai/nl-capture/history":{"get":{"summary":"List recent NL-capture history for the calling user","tags":["Ai"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CaptureHistoryRow"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Record a manual NL-capture history entry","tags":["Ai"],"x-ratelimit-class":"write","x-required-scopes":["ai:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordCaptureHistoryInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureHistoryRow"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai/nl-capture/history/{id}/imported":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Mark a capture history row as imported (stamps `importedAt`)","tags":["Ai"],"x-ratelimit-class":"write","x-required-scopes":["ai:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureHistoryRow"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai/nl-capture/history/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete a capture history entry","tags":["Ai"],"x-ratelimit-class":"write","x-required-scopes":["ai:write"],"responses":{"204":{"description":"Deleted"},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai/ask":{"post":{"summary":"Ask Atlas - retrieval-augmented natural-language Q&A","description":"Embeds the prompt, retrieves grounded context across tasks / projects / comments / docs, calls the LLM, and returns a cited answer.","tags":["Ai"],"x-ratelimit-class":"ai","x-required-scopes":["ai:read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskAtlasInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskAtlasResponse"}}}},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai/standup/run":{"post":{"summary":"Generate a per-user standup digest","description":"Aggregates yesterday's activity + today's plan into a short summary; safe to run on a cron.","tags":["Ai"],"x-ratelimit-class":"ai","x-required-scopes":["ai:write"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandupRunInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandupRunResponse"}}}},"403":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"422":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai/agentic/planner/runs":{"get":{"summary":"List agentic planner runs","description":"Each run captures the planner's tool-admission decisions and step outputs for replay + audit.","tags":["Ai"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["planning","executing","awaiting-approval","completed","failed","cancelled"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgenticPlannerRun"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai/agentic/planner/runs/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a single agentic planner run (with steps + tool admissions)","tags":["Ai"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgenticPlannerRun"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/ai/agentic/tool-admissions":{"get":{"summary":"List the most recent tool-admission decisions made by the planner","description":"Pure audit feed; surface in the AI observability console to spot tools the planner is repeatedly rejecting.","tags":["Ai"],"x-ratelimit-class":"read","x-required-scopes":["ai:read"],"parameters":[{"name":"toolName","in":"query","required":false,"schema":{"type":"string"}},{"name":"allowed","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgenticPlannerToolAdmission"}}}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/project-risks/rollup":{"get":{"summary":"Risk roll-up for a project (active count, exposure, suggested RAG)","description":"Returns the aggregate risk shape used by the project health badge: `active` (open + mitigating count), `exposure` (sum of likelihood*impact across active risks), `severeCount` (>=12), and a suggested RAG flag (`GREEN | AMBER | RED`).","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/project-risks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update a project risk","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"delete":{"summary":"Soft-delete a project risk","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"responses":{"204":{"description":"Deleted"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/budget":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read the budget snapshot for a project (planned vs actual)","description":"Returns the planned envelope (minutes + cents + currency), the actual minutes (rolled up from closed time entries), the variance, and a per-task breakdown of the top-25 contributors.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"patch":{"summary":"Update the planned budget for a project","description":"Set or clear `plannedBudgetMinutes`, `plannedBudgetCurrencyCents`, and `plannedBudgetCurrency`. Pass `null` to clear a value. The actual minutes / variance fields refresh on read.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/okrs":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List Objectives + Key Results linked to a project","tags":["Projects","Goals"],"x-ratelimit-class":"read","x-required-scopes":["goals:read","projects:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/timeline":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"get":{"summary":"Read milestones + tasks as a Gantt-ready timeline","description":"Returns a flat list of milestone and task items with start/end dates, parent grouping, status, and dependency edges. The optional `from` / `to` window defaults to the project bounds (or the project createdAt + 30 days when no bounds are set).","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/insights/burndown":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"get":{"summary":"Read the daily burn-down (scope, completed, remaining)","description":"For each UTC day in the window, returns total scope minutes, cumulative completed minutes, and remaining minutes. Also returns the linear ideal-line endpoints so the front-end can render both lines without re-deriving the math. Default window is the last 14 days; pass `from` / `to` ISO timestamps to override.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"projectId":"prj_01HW3T2K8X9Y2VPRZGQX9NDY1A","windowStart":"2026-04-23T00:00:00Z","windowEnd":"2026-05-06T00:00:00Z","series":[{"date":"2026-04-23","scopeMinutes":4800,"completedMinutes":0,"remainingMinutes":4800},{"date":"2026-04-30","scopeMinutes":4800,"completedMinutes":1920,"remainingMinutes":2880},{"date":"2026-05-06","scopeMinutes":5040,"completedMinutes":3120,"remainingMinutes":1920}],"idealLine":{"start":{"date":"2026-04-23","remainingMinutes":4800},"end":{"date":"2026-05-06","remainingMinutes":0}}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/insights/cycle-time":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"bucketDays","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":30}}],"get":{"summary":"Read cycle-time histogram, p50 / p90, and 7-day velocity","description":"Returns a histogram of cycle-time (days from create to done) bucketed by `bucketDays` (default 1), the p50 + p90 across completed tasks, the total sample size, and a velocity comparison of the last 7 days vs the prior 7 days.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/integrations":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read the Slack + calendar bindings on a project","description":"Returns the current Slack workspace + channel binding and calendar connection bound to a project. All fields are nullable when no link exists.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/slack":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Bind a project to a Slack workspace + channel (or clear it)","description":"Pass `{\"binding\":{\"installationId\",\"channelId\",\"channelName\"}}` to bind, or `{\"binding\":null}` to unbind. Cross-tenant installations are rejected with 400.","tags":["Projects","Slack"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/calendar":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Bind a project to a calendar connection (or clear it)","description":"Pass `{\"binding\":{\"connectionId\"}}` to bind, or `{\"binding\":null}` to unbind. Cross-tenant connections are rejected with 400.","tags":["Projects","Calendar"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/exports":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List recent CSV / PDF / DECK exports for a project","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Kick off a new project export","description":"Accepts `{\"format\": \"CSV\" | \"PDF\" | \"DECK\"}`. CSV renders synchronously; PDF / DECK render an HTML status report the user opens in a new tab and prints. Returns the export row with `status: \"DONE\"` and a `downloadUrl`.","tags":["Projects"],"x-ratelimit-class":"write","x-required-scopes":["projects:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/integrations/slack/installations/{id}/channels":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":80}}],"get":{"summary":"List joinable Slack channels for an installation","description":"Returns the workspace's public + private channels (archived and DMs filtered out) for a Slack installation owned by the calling tenant. Supports cursor-based pagination via Slack's `response_metadata.next_cursor`. Optional `q` is applied as a client-side substring filter ranked exact-match  starts-with  contains. Bot must be invited to a channel before posting; the response includes `isMember` so the caller can warn the user upfront. Responses are cached for 60s per (installation, cursor, query).","tags":["Slack"],"x-ratelimit-class":"read","x-required-scopes":["webhooks:manage"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"502":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/projects/{id}/exports/{exportId}/download":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"exportId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Download (CSV) or render (HTML for PDF / DECK) an export","description":"Returns the export body. CSV exports are served as `text/csv`. PDF and DECK exports return a printable HTML page; the user opens it in a new tab and uses the browser print dialog to save a PDF / set of slides. Expired downloads return `410 Gone`.","tags":["Projects"],"x-ratelimit-class":"read","x-required-scopes":["projects:read"],"responses":{"200":{"description":"OK"},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"410":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/tickets":{"get":{"summary":"List HR tickets (admin view)","description":"Admin-only listing. Supports filtering by status, category, priority, employee, and assignee. Returns the same `HrTicket` shape as the per-id read; messages are included so the inbox view never needs a per-row fetch.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/HrTicketStatus"}},{"name":"category","in":"query","required":false,"schema":{"$ref":"#/components/schemas/HrTicketCategory"}},{"name":"priority","in":"query","required":false,"schema":{"$ref":"#/components/schemas/HrTicketPriority"}},{"name":"employeeId","in":"query","required":false,"schema":{"type":"string"}},{"name":"assignedToId","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HrTicket"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/tickets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a single HR ticket (admin view)","description":"Returns the full `HrTicket` including all messages (both public and internal notes). 404 if outside the tenant.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicket"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/tickets/{id}/assign":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Assign an HR ticket to an HR agent","description":"Set `assignedToId` to the HR user id, or `null` to unassign.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignHrTicketInput"},"examples":{"assign":{"summary":"Assign to HR agent","value":{"assignedToId":"usr_01HW3T..."}},"unassign":{"summary":"Unassign","value":{"assignedToId":null}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicket"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/tickets/{id}/priority":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Change ticket priority","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeHrTicketPriorityInput"},"example":{"priority":"HIGH"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicket"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/tickets/{id}/status":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Change ticket status","description":"Use `/resolve` and `/close` for the terminal states - those endpoints also stamp `resolvedAt` / `closedAt`.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeHrTicketStatusInput"},"example":{"status":"IN_PROGRESS"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicket"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/tickets/{id}/messages":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Post a message (or internal note) on an HR ticket","description":"When `isInternalNote: true` the message stays HR-only and never appears on the employee timeline. Available on the admin surface only.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostAdminHrTicketMessageInput"},"examples":{"publicReply":{"summary":"Public reply visible to the employee","value":{"body":"We're looking into your leave balance now. Will respond by EOD.","isInternalNote":false}},"internalNote":{"summary":"HR-only internal note","value":{"body":"Payroll already reverted Mar 18 deduction. Confirm before replying.","isInternalNote":true}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicketMessage"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/tickets/{id}/resolve":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Mark an HR ticket resolved","description":"Sets `status: RESOLVED` and stamps `resolvedAt`. The employee can still reopen by posting another message within the cooldown.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicket"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/tickets/{id}/close":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Close an HR ticket","description":"Terminal state. Sets `status: CLOSED` and stamps `closedAt`. The employee can no longer reopen; a brand-new ticket is required.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicket"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/tickets":{"get":{"summary":"List the calling user's HR tickets","description":"Returns only the calling user's own tickets. Internal HR notes are stripped from the returned `messages`.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HrTicket"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Open a new HR ticket as the calling user","description":"Self-service create. `employeeId` is derived from the session - never accepted from the body.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOwnHrTicketInput"},"examples":{"leaveQuery":{"summary":"Leave-balance question","value":{"category":"LEAVE","subject":"My leave balance shows the wrong number","body":"My casual leave balance shows 4 days; I think I only used 1 day this quarter.","priority":"NORMAL"}},"payrollUrgent":{"summary":"Urgent payroll issue","value":{"category":"PAYROLL","subject":"March payslip missing HRA","body":"My March payslip is missing the HRA component. Other months look correct.","priority":"HIGH"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicket"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/tickets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one of the calling user's HR tickets","description":"404 if the ticket belongs to another employee.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicket"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/tickets/{id}/messages":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Post a public message on the calling user's ticket","description":"Self-service variant - cannot set `isInternalNote` and always posts a public message visible to HR.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOwnHrTicketMessageInput"},"example":{"body":"Thanks - sharing the screenshot you asked for."}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicketMessage"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/tickets/{id}/rate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Rate the resolution of a personal HR ticket","description":"CSAT. Accepts an integer 1-5; can only be set once the ticket is RESOLVED or CLOSED.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateHrTicketInput"},"example":{"satisfactionRating":5}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrTicket"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/policies":{"get":{"summary":"List HR policies (admin view)","description":"Admin listing. Optionally include superseded (retired) policies; the self-service surface filters them out automatically.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"includeSuperseded","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HrPolicy"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Create an HR policy","description":"Slug is per-tenant unique and stable forever (URL identity). Subsequent edits bump `version`.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHrPolicyInput"},"example":{"slug":"remote-work","title":"Remote Work Policy","category":"Workplace","body":"# Remote Work\n\nAtlas supports up to 3 remote days per week...","requiresAcknowledgement":true,"effectiveFrom":"2026-04-01"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrPolicy"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/policies/{slug}":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read an HR policy by slug","description":"Admin lookup by stable slug. Returns the latest version regardless of supersession state.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrPolicy"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/policies/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update an HR policy","description":"Partial update; any non-empty field set bumps `version` and invalidates prior acknowledgements (employees are re-asked).","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateHrPolicyInput"},"examples":{"titleOnly":{"summary":"Rename","value":{"title":"Remote & Hybrid Work Policy"}},"bodyAndDate":{"summary":"Revise body and push effective date","value":{"body":"Updated to allow 4 remote days/week.","effectiveFrom":"2026-07-01"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrPolicy"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/policies/{id}/supersede":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Mark an HR policy as superseded by a new version","description":"Retires the policy. Pass `supersededByPolicyId` to point at a replacement so callers can walk the chain; omit to sunset with no successor.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupersedeHrPolicyInput"},"examples":{"withReplacement":{"summary":"With replacement","value":{"supersededByPolicyId":"pol_01HW3T..."}},"noReplacement":{"summary":"Sunset (no successor)","value":{}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrPolicy"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/policies/{id}/acknowledgements":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List acknowledgement records for an HR policy","description":"Audit trail showing which employees acknowledged which version, with IP + user agent for compliance.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HrPolicyAcknowledgement"}}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/policies":{"get":{"summary":"List active HR policies for the calling user","description":"Self-service surface. Hides superseded policies automatically.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HrPolicy"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/policies/{slug}":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read an active HR policy by slug","description":"404 if the policy is superseded or not yet effective. Use the admin endpoint to inspect retired policies.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrPolicy"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/me/policies/{id}/acknowledge":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Acknowledge an HR policy","description":"Optional `policyVersion` pins the version the employee actually read - prevents a race where HR bumped the policy after the employee opened it.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcknowledgeHrPolicyInput"},"examples":{"current":{"summary":"Acknowledge current version","value":{}},"pinned":{"summary":"Pin the read version","value":{"policyVersion":3}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HrPolicyAcknowledgement"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/probations":{"get":{"summary":"List probation records","description":"Filter by status or employee. Returns full `Probation` rows so the inbox view can render without per-row fetches.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ProbationStatus"}},{"name":"employeeId","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Probation"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Initiate a probation period for an employee","description":"Opens a PENDING probation. `endDate` is the scheduled review date; extend or confirm before it lapses.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateProbationInput"},"example":{"employeeId":"emp_01HW3T...","startDate":"2026-01-15","endDate":"2026-04-15","notes":"Standard 90-day probation for new joiner."}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Probation"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/probations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one probation record","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Probation"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/probations/{id}/confirm":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Confirm successful completion of a probation","description":"Sets `status: CONFIRMED` and stamps `confirmedAt` / `confirmedById`. Terminal state.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Probation"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/probations/{id}/extend":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Extend a probation period","description":"Pushes the review date out to `extendedToDate`. Sets `status: EXTENDED`. Can be called multiple times.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendProbationInput"},"example":{"extendedToDate":"2026-05-15","notes":"Needs another month to ramp on the migration project."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Probation"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/probations/{id}/terminate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Terminate a probation (unsuccessful outcome)","description":"Sets `status: TERMINATED` and records `terminationReason`. Terminal state; pairs with the offboarding flow.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminateProbationInput"},"example":{"reason":"Performance below the agreed bar after two extensions."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Probation"}}}},"404":{"description":"Problem+json error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}},"/v1/hr/role-changes":{"get":{"summary":"List role-change requests","description":"Two-step approval workflow inbox: PENDING -> MANAGER_APPROVED -> HR_APPROVED -> APPLIED, with REJECTED as a side branch.","tags":["HR"],"x-ratelimit-class":"read","x-required-scopes":["profile:read"],"parameters":[{"name":"employeeId","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/RoleChangeStatus"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoleChange"}}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}},"post":{"summary":"Request a role change for an employee","description":"Opens a PENDING request. The requester cannot also be the approving manager - a different user must call `/manager-approve`.","tags":["HR"],"x-ratelimit-class":"write","x-required-scopes":["profile:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestRoleChangeInput"},"examples":{"titleOnly":{"summary":"Title-only promotion","value":{"employeeId":"emp_01HW3T...","newJobTitle":"Staff Engineer","effectiveFrom":"2026-07-01","reason":"Promoted after Q2 review cycle."}},"fullMove":{"summary":"Transfer with new department + manager","value":{"employeeId":"emp_01HW3T...","newJobTitle":"Senior PM","newDepartmentId":"dep_01HW3T...","newManagerId":"usr_01HW3T...","effectiveFrom":"2026-07-01","reason":"Internal transfer to Atlas Platform."}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleChange"}}}},"429":{"description":"Too many requests. Includes a `Retry-After` header (seconds).","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds when the bucket resets."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemJson"}}}}}}}}}