{"openapi":"3.0.3","info":{"title":"Copera Public API","version":"1.0.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token"},"omniServerApiKey":{"type":"http","scheme":"bearer","bearerFormat":"cp_omni_sk_…","description":"Source-bound Omni server API key. Keep this key on your server."}},"schemas":{}},"paths":{"/public/v1/automations/":{"get":{"summary":"List Automations","tags":["API Reference","public","automations"],"description":"List the automations in this workspace the token user can see, newest-updated first. Authoring (create, update, publish) is not part of the Public API: an automation graph is validated against a server-owned block registry and edited in the Copera builder. This resource lets you discover automations, read their run history, invoke them, retry a failed run, and turn them on or off.","parameters":[{"schema":{"type":"string","enum":["board","doc","chat","meeting","external","workforce","omni"]},"in":"query","name":"surface","required":false,"description":"Only automations on this surface."},{"schema":{"type":"string","enum":["draft","enabled","disabled","archived"]},"in":"query","name":"status","required":false,"description":"Only automations in this status. Defaults to everything except archived."},{"schema":{"minimum":1,"maximum":100,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max results (1-100). Defaults to 25."},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"`nextCursor` from the previous page."}],"x-mint":{"metadata":{"title":"List Automations","description":"List automations visible to the token user"},"content":"## Overview\n\nReturns every automation in the workspace the token user is entitled to see, across all surfaces (board, meeting, workforce), newest-updated first. Visibility follows the same per-surface rule as the Copera app: a board automation is visible to people who can manage that board's automations; a workspace-level one to workspace members.\n\n## Query Parameters\n\n- `surface` (optional): `board`, `meeting`, `workforce`, …\n- `status` (optional): `draft`, `enabled`, `disabled`, `archived`. Archived is excluded by default\n- `limit` (optional): 1-100, default 25\n- `cursor` (optional): `nextCursor` from the previous page","mcp":{"enabled":true,"name":"list_automations","description":"List Copera automations visible to the token"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automations":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"surface":{"type":"string"},"surfaceRef":{"description":"Where the automation lives, e.g. `{ \"boardId\": \"...\" }`.","type":"object","additionalProperties":{"type":"string"}},"status":{"type":"string"},"ownerId":{"type":"string"},"agentInstallId":{"description":"Set when a hired AI employee owns this automation.","type":"string"},"hasPublishedVersion":{"type":"boolean"},"hasDraftVersion":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["_id","name","description","surface","surfaceRef","status","hasPublishedVersion","hasDraftVersion","createdAt","updatedAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["automations","nextCursor"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/automations/{automationId}":{"get":{"summary":"Get Automation","tags":["API Reference","public","automations"],"description":"Get one automation with its published and draft version metadata and validation status. Authoring (create, update, publish) is not part of the Public API: an automation graph is validated against a server-owned block registry and edited in the Copera builder. This resource lets you discover automations, read their run history, invoke them, retry a failed run, and turn them on or off.","parameters":[{"schema":{"type":"string","enum":["graph"]},"in":"query","name":"include","required":false,"description":"Pass `graph` to also return the published/draft block graphs. Omitted by default because a graph is large and is withheld entirely for automations owned by a marketplace agent's creator."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"automationId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Automation","description":"Read an automation's versions and validation status"},"content":"## Overview\n\nReturns the automation's definition, the metadata of its published (`currentVersion`) and `draftVersion`, and `isValid` — false when the version that would run still has blocking validation issues.\n\nThe block graph is **not** returned by default; pass `?include=graph`. Automations owned by a hired marketplace agent never disclose their creator's graph — the response sets `graphWithheld: true` instead.","mcp":{"enabled":true,"name":"get_automation","description":"Read a Copera automation's versions and validity"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","allOf":[{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"surface":{"type":"string"},"surfaceRef":{"description":"Where the automation lives, e.g. `{ \"boardId\": \"...\" }`.","type":"object","additionalProperties":{"type":"string"}},"status":{"type":"string"},"ownerId":{"type":"string"},"agentInstallId":{"description":"Set when a hired AI employee owns this automation.","type":"string"},"hasPublishedVersion":{"type":"boolean"},"hasDraftVersion":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["_id","name","description","surface","surfaceRef","status","hasPublishedVersion","hasDraftVersion","createdAt","updatedAt"]},{"type":"object","properties":{"currentVersion":{"type":"object","properties":{"_id":{"type":"string"},"versionNumber":{"type":"number"},"state":{"type":"string"},"publishedAt":{"format":"date-time","type":"string"},"validationIssues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string"},"message":{"type":"string"},"nodeId":{"type":"string"},"fieldPath":{"type":"string"}},"required":["code","severity","message"]}},"graph":{"description":"Only present with `?include=graph`.","type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"blockId":{"type":"string"},"blockVersion":{"type":"number"},"input":{"type":"object","additionalProperties":{}}},"required":["id","blockId","blockVersion"]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"sourceHandle":{"type":"string"},"targetHandle":{"type":"string"},"label":{"type":"string"}},"required":["id","source","target"]}}},"required":["nodes","edges"]}},"required":["_id","versionNumber","state","validationIssues"]},"draftVersion":{"type":"object","properties":{"_id":{"type":"string"},"versionNumber":{"type":"number"},"state":{"type":"string"},"publishedAt":{"format":"date-time","type":"string"},"validationIssues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string"},"message":{"type":"string"},"nodeId":{"type":"string"},"fieldPath":{"type":"string"}},"required":["code","severity","message"]}},"graph":{"description":"Only present with `?include=graph`.","type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"blockId":{"type":"string"},"blockVersion":{"type":"number"},"input":{"type":"object","additionalProperties":{}}},"required":["id","blockId","blockVersion"]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"sourceHandle":{"type":"string"},"targetHandle":{"type":"string"},"label":{"type":"string"}},"required":["id","source","target"]}}},"required":["nodes","edges"]}},"required":["_id","versionNumber","state","validationIssues"]},"isValid":{"description":"False when the version that would run has blocking validation issues.","type":"boolean"},"graphWithheld":{"description":"True when `?include=graph` was requested but the automation belongs to a marketplace agent's creator, whose implementation is never disclosed.","type":"boolean"}},"required":["isValid","graphWithheld"]}]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/automations/{automationId}/runs":{"get":{"summary":"List Automation Runs","tags":["API Reference","public","automations"],"description":"List a single automation's runs, newest first, with per-run status, duration, step count and error summary.","parameters":[{"schema":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled","skipped"]},"in":"query","name":"status","required":false,"description":"Only runs in this status."},{"schema":{"minimum":1,"maximum":100,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max results (1-100). Defaults to 25."},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"`nextCursor` from the previous page."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"automationId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"List Automation Runs","description":"Page an automation's run history"},"content":"## Overview\n\nNewest-first run history for one automation. Filter with `status` (`queued`, `running`, `waiting`, `succeeded`, `failed`, `cancelled`, `skipped`) and page with `cursor`.\n\nEach entry carries the run's status, outcome, start/finish, duration, how many steps executed, and — for failed or skipped runs — a redacted error summary. Use **Get Automation Run** for per-step detail.","mcp":{"enabled":true,"name":"list_automation_runs","description":"Page a Copera automation's run history"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"status":{"type":"string"},"outcome":{"type":"string"},"startedAt":{"format":"date-time","type":"string"},"finishedAt":{"format":"date-time","type":"string"},"durationMs":{"type":"number"},"stepCount":{"type":"number"},"error":{"type":"object","properties":{"code":{"type":"string"},"detailCode":{"type":"string"},"message":{"type":"string"}}},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","automationId","automationVersionId","status","stepCount","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["runs","nextCursor"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/automations/runs/{runId}":{"get":{"summary":"Get Automation Run","tags":["API Reference","public","automations"],"description":"Get one run with its per-step statuses and errors. Step inputs and outputs are never returned.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"runId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Automation Run","description":"Read a run's per-step statuses and errors"},"content":"## Overview\n\nReturns the run plus each step it executed: node id, block id, status, attempt count, timing and — on failure — a redacted error.\n\nStep **inputs and outputs are deliberately never exposed** through the Public API; they can contain row content, message bodies and model output. Runs on surfaces whose step detail is private (meeting automations) return `steps: []` with `stepsWithheld: true`.","mcp":{"enabled":true,"name":"get_automation_run","description":"Read a Copera automation run's step statuses"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","allOf":[{"type":"object","properties":{"_id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"status":{"type":"string"},"outcome":{"type":"string"},"startedAt":{"format":"date-time","type":"string"},"finishedAt":{"format":"date-time","type":"string"},"durationMs":{"type":"number"},"stepCount":{"type":"number"},"error":{"type":"object","properties":{"code":{"type":"string"},"detailCode":{"type":"string"},"message":{"type":"string"}}},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","automationId","automationVersionId","status","stepCount","createdAt"]},{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"nodeId":{"type":"string"},"blockId":{"type":"string"},"status":{"type":"string"},"attempt":{"type":"number"},"startedAt":{"format":"date-time","type":"string"},"finishedAt":{"format":"date-time","type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"detailCode":{"type":"string"},"message":{"type":"string"}}}},"required":["_id","nodeId","blockId","status","attempt"]}},"stepsWithheld":{"description":"True for surfaces whose step detail carries private content (meeting runs). Only the run-level summary is disclosed.","type":"boolean"}},"required":["steps","stepsWithheld"]}]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/automations/{automationId}/run":{"post":{"summary":"Run Automation Now","tags":["API Reference","public","automations"],"description":"Invoke an enabled, published automation on demand. Returns the run that was started.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"triggerNodeId":{"maxLength":200,"description":"Which trigger's event to synthesize. Required only when the automation has more than one trigger — the error names the available ids.","type":"string"},"entityRef":{"description":"Entity the run is about, e.g. `{ \"rowId\": \"...\" }` for a board trigger. A trigger that describes something happening TO an entity refuses to run without it (422).","type":"object","additionalProperties":{"type":"string"}},"payload":{"description":"Free-form trigger payload, mirroring what the real event would carry (webhook triggers use this).","type":"object","additionalProperties":{}},"idempotencyKey":{"maxLength":200,"description":"Repeat calls with the same key collapse into the same run instead of starting a new one.","type":"string"}}}}}},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"automationId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Run Automation Now","description":"Invoke an automation on demand"},"content":"## Overview\n\nSynthesizes the automation's trigger event and starts a run, as the token user. The automation must be **enabled** and have a **published** version.\n\n- `triggerNodeId` — required only when the automation has more than one trigger; the 400 lists the available ids.\n- `entityRef` — triggers that describe something happening to an entity (a board row, a chat message, a conversation) cannot be invented from nothing. Omit the entity and you get **422** with the exact missing keys in `missing`.\n- `idempotencyKey` — repeat calls with the same key resolve to the same run.\n\nThe automation always runs on **its own surface**; there is no way to point an invocation at a different board or channel than the one it was published against.\n\nConcurrency limits, the workspace credit gate and the automation's spend envelope all apply exactly as they do for a real trigger.","mcp":{"enabled":true,"name":"run_automation","description":"Run a Copera automation on demand"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"status":{"type":"string"},"outcome":{"type":"string"},"startedAt":{"format":"date-time","type":"string"},"finishedAt":{"format":"date-time","type":"string"},"durationMs":{"type":"number"},"stepCount":{"type":"number"},"error":{"type":"object","properties":{"code":{"type":"string"},"detailCode":{"type":"string"},"message":{"type":"string"}}},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","automationId","automationVersionId","status","stepCount","createdAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/automations/runs/{runId}/retry":{"post":{"summary":"Retry Automation Run","tags":["API Reference","public","automations"],"description":"Replay a failed or skipped run using the original trigger event. Returns the new run.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"runId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Retry Automation Run","description":"Replay a failed automation run"},"content":"## Overview\n\nRe-runs the original trigger event against the version the failed run used, so the retry replays exactly what the first attempt saw.\n\nA retry is **refused (400)** when it would duplicate a side effect the first attempt already completed — a sent email, a posted message, a created row — or when the run is still running, was cancelled, is awaiting review, was rejected, or already completed.","mcp":{"enabled":true,"name":"retry_automation_run","description":"Retry a failed Copera automation run"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"status":{"type":"string"},"outcome":{"type":"string"},"startedAt":{"format":"date-time","type":"string"},"finishedAt":{"format":"date-time","type":"string"},"durationMs":{"type":"number"},"stepCount":{"type":"number"},"error":{"type":"object","properties":{"code":{"type":"string"},"detailCode":{"type":"string"},"message":{"type":"string"}}},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","automationId","automationVersionId","status","stepCount","createdAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/automations/{automationId}/enable":{"post":{"summary":"Enable Automation","tags":["API Reference","public","automations"],"description":"Turn an automation on. Requires a published version and write access to its surface.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"automationId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Enable Automation","description":"Turn an automation on"},"content":"## Overview\n\nMoves the automation to `enabled` so its triggers fire. The automation must already have a published version — publishing is a first-party act, not a Public API one.","mcp":{"enabled":true,"name":"enable_automation","description":"Turn a Copera automation on"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"surface":{"type":"string"},"surfaceRef":{"description":"Where the automation lives, e.g. `{ \"boardId\": \"...\" }`.","type":"object","additionalProperties":{"type":"string"}},"status":{"type":"string"},"ownerId":{"type":"string"},"agentInstallId":{"description":"Set when a hired AI employee owns this automation.","type":"string"},"hasPublishedVersion":{"type":"boolean"},"hasDraftVersion":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["_id","name","description","surface","surfaceRef","status","hasPublishedVersion","hasDraftVersion","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/automations/{automationId}/disable":{"post":{"summary":"Disable Automation","tags":["API Reference","public","automations"],"description":"Turn an automation off. Triggers stop firing; run history is kept.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"automationId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Disable Automation","description":"Turn an automation off"},"content":"## Overview\n\nMoves the automation to `disabled`. Its triggers stop firing immediately; the definition, its versions and its run history are all kept, so **Enable Automation** restores it unchanged.","mcp":{"enabled":true,"name":"disable_automation","description":"Turn a Copera automation off"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"surface":{"type":"string"},"surfaceRef":{"description":"Where the automation lives, e.g. `{ \"boardId\": \"...\" }`.","type":"object","additionalProperties":{"type":"string"}},"status":{"type":"string"},"ownerId":{"type":"string"},"agentInstallId":{"description":"Set when a hired AI employee owns this automation.","type":"string"},"hasPublishedVersion":{"type":"boolean"},"hasDraftVersion":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["_id","name","description","surface","surfaceRef","status","hasPublishedVersion","hasDraftVersion","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/board/list-boards":{"get":{"summary":"List Boards","tags":["API Reference","public","board"],"description":"List all boards the integration has access to within the workspace.","parameters":[{"schema":{"maxLength":200,"type":"string"},"in":"query","name":"q","required":false,"description":"Case-insensitive search query."}],"x-mint":{"metadata":{"title":"List All Boards","description":"Retrieve all boards accessible to your integration"},"content":"## Overview\n\nThis endpoint returns a list of all boards that your integration has access to within the workspace.\n\nPass `q` to filter by board name or description.\n\n## Response\n\nReturns an array of board objects, each containing:\n- Board ID\n- Name and description\n- Creation and update timestamps","mcp":{"enabled":true,"name":"list_boards","description":"List all boards in the workspace"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst boards = await copera.board.listBoards();\nconsole.log(boards);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","createdAt","updatedAt"]}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/":{"post":{"summary":"Create Board","tags":["API Reference","public","board"],"description":"Create a new board owned by the token user, with a default table ready for rows.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"minLength":1,"maxLength":240,"description":"Board name (1–200 characters after trim; transport allows bounded padding).","type":"string"},"description":{"maxLength":2000,"type":"string"},"tableName":{"minLength":1,"maxLength":240,"description":"Name for the board's default table (1–200 after trim). Defaults to \"Table\".","type":"string"},"columns":{"maxItems":32,"description":"Optional custom columns for the default table (max 32). Labels must be unique case-insensitively.","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"label":{"minLength":1,"maxLength":240,"description":"Column label (1–200 Unicode code points after trim; transport allows bounded padding).","type":"string"},"type":{"anyOf":[{"type":"string","enum":["TEXT"]},{"type":"string","enum":["PARAGRAPH"]},{"type":"string","enum":["NUMBER"]},{"type":"string","enum":["MONEY"]},{"type":"string","enum":["DATE"]},{"type":"string","enum":["EMAIL"]},{"type":"string","enum":["PHONE"]},{"type":"string","enum":["WEBSITE"]},{"type":"string","enum":["CHECKBOX"]},{"type":"string","enum":["STATUS"]},{"type":"string","enum":["DROPDOWN"]},{"type":"string","enum":["LABELS"]},{"type":"string","enum":["USERS"]},{"type":"string","enum":["CONTACT"]},{"type":"string","enum":["LOCATION"]},{"type":"string","enum":["DESCRIPTION"]},{"type":"string","enum":["FILE"]},{"type":"string","enum":["CHECKLIST"]}]},"options":{"maxItems":20,"minItems":1,"description":"Initial options for STATUS/DROPDOWN/LABELS only (max 20 on create-board blueprint).","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"label":{"minLength":1,"maxLength":240,"description":"Option label (1–200 Unicode code points after trim; transport allows bounded padding).","type":"string"},"color":{"maxLength":70,"description":"Option color (max 50 Unicode code points after trim; transport allows bounded padding).","type":"string"}},"required":["label"]}},"format":{"anyOf":[{"type":"string","enum":["DATE_ISO"]},{"type":"string","enum":["DATE_TIME_ISO"]}]}},"required":["label","type"]}}},"required":["name"]}}},"required":true},"x-mint":{"metadata":{"title":"Create Board","description":"Create a new board with a default table"},"content":"## Overview\n\nCreates a new board owned by the token user. The board comes with one default table (named `tableName`, or \"Table\") so you can start writing rows immediately — the response includes `defaultTableId`.\n\nBoard creation follows the workspace's member permissions: external users cannot create boards, and workspaces that restrict board creation to specific roles apply the same restriction to API tokens.\n\n## Request Body\n\n- `name` (required): Board name (1-200 characters)\n- `description` (optional): Board description (max 2,000 characters)\n- `tableName` (optional): Name for the default table (1-200 characters). Defaults to \"Table\".\n- `columns` (optional): Up to 32 custom columns. Types are uppercase. `DATE` alone accepts `format: DATE_ISO | DATE_TIME_ISO`; `STATUS`, `DROPDOWN`, and `LABELS` alone accept up to 20 `options`.\n\nThe response includes `defaultTableId` and a `columns` mapping with every created `columnId`, plus option IDs for select columns.","mcp":{"enabled":true,"name":"create_board","description":"Create a new board with a default table"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst board = await copera.board.createBoard({\n  name: 'Q3 Launch Plan',\n  description: 'Everything for the Q3 launch',\n  tableName: 'Campaigns',\n  columns: [\n    { label: 'Publish At', type: 'DATE', format: 'DATE_TIME_ISO' },\n    {\n      label: 'Approval Status',\n      type: 'STATUS',\n      options: [{ label: 'AI Created', color: 'BLUE' }]\n    }\n  ]\n});\nconsole.log(board.defaultTableId, board.columns);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"defaultTableId":{"description":"Id of the board's default table, created alongside the board. Always present (use it to write rows immediately).","type":"string"},"columns":{"description":"Custom columns created with the board. Empty array when none were requested.","type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"format":{"anyOf":[{"type":"string","enum":["DATE_ISO"]},{"type":"string","enum":["DATE_TIME_ISO"]}]},"options":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"label":{"type":"string"},"color":{"type":"string"},"order":{"description":"Sort order of the option (always present at runtime for new provisions).","type":"number"}},"required":["optionId","label","order"]}}},"required":["columnId","label","type"]}}},"required":["_id","name","defaultTableId","columns"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table":{"post":{"summary":"Create Board Table","tags":["API Reference","public","board","table"],"description":"Create a new table on a board, with the default system columns and view. Requires board admin.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"minLength":1,"maxLength":240,"type":"string"}},"required":["name"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Create Board Table","description":"Add a new table to an existing board"},"content":"## Overview\n\nCreates a new table on the specified board. The table is created with the default system columns and a default grid view; add more columns with the create-column endpoint or from the app.\n\nThe token user must be a board admin — the same requirement as renaming or deleting tables.\n\n## Request Body\n\n- `name` (required): Table name (1-200 characters)","mcp":{"enabled":true,"name":"create_table","description":"Create a new table on a board"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst table = await copera.board.createBoardTable({\n  boardId: 'board_id_here',\n  name: 'Backlog'\n});\nconsole.log(table._id);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"boardId":{"type":"string"}},"required":["_id","name","boardId"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}":{"get":{"summary":"Get Board","tags":["API Reference","public","board"],"description":"Retrieve details of a specific board using its boardId.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Board Details","description":"Retrieve detailed information about a specific board"},"content":"## Prerequisites\n\n- Valid API key with board read permissions\n- Board ID of the board you want to retrieve\n\n## Parameters\n\n- `boardId`: A 24-character hexadecimal ObjectId identifying the board","mcp":{"enabled":true,"name":"get_board","description":"Get details of a specific board by ID"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst board = await copera.board.getBoardDetails('board_id_here');\nconsole.log(board);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"patch":{"summary":"Update Board","tags":["API Reference","public","board"],"description":"Update a board's name, description, or icon. Requires board admin.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"minLength":1,"maxLength":240,"type":"string"},"description":{"maxLength":2000,"type":"string"},"icon":{"maxLength":240,"type":"string"}}}}}},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Update Board","description":"Rename a board or change its description/icon"},"content":"## Overview\n\nUpdates board metadata. Only provided fields change. The token user must be a board admin.","mcp":{"enabled":true,"name":"update_board","description":"Update a board's name, description, or icon"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["_id","name"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"delete":{"summary":"Delete Board","tags":["API Reference","public","board"],"description":"Move a board to the workspace trash. Requires board admin. Boards in trash can be restored from the app.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Delete Board","description":"Move a board to the workspace trash"},"content":"## Overview\n\nMoves the board to the workspace trash (soft delete — restorable from the app). The token user must be a board admin.","mcp":{"enabled":true,"name":"delete_board","description":"Move a board to the workspace trash"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/participants":{"post":{"summary":"Add Board Participants","tags":["API Reference","public","board"],"description":"Add workspace users or teams (including hired AI agents) to a board. Requires board admin.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"participantIds":{"minItems":1,"maxItems":50,"description":"Workspace user or team ids to add as board participants.","type":"array","items":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}}},"required":["participantIds"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Add Board Participants","description":"Add users, teams, or AI agents to a board"},"content":"## Overview\n\nAdds up to 50 participants to the board in one call. Accepts workspace user ids, team ids, and hired AI-agent actor ids. The token user must be a board admin.","mcp":{"enabled":true,"name":"add_board_participants","description":"Add users, teams, or AI agents to a board"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"boardId":{"type":"string"},"participantUserIds":{"type":"array","items":{"type":"string"}}},"required":["boardId","participantUserIds"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/participant/{participantId}":{"delete":{"summary":"Remove Board Participant","tags":["API Reference","public","board"],"description":"Remove a participant from a board. Requires board admin; the board owner cannot be removed.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"participantId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Remove Board Participant","description":"Remove a user or team from a board"},"content":"## Overview\n\nRemoves one participant from the board. The token user must be a board admin; the board owner cannot be removed.","mcp":{"enabled":true,"name":"remove_board_participant","description":"Remove a participant from a board"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}":{"patch":{"summary":"Update Board Table","tags":["API Reference","public","board","table"],"description":"Rename a table on a board. Requires board admin.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"minLength":1,"maxLength":240,"type":"string"}},"required":["name"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Update Board Table","description":"Rename a table"},"content":"## Overview\n\nRenames the table. The token user must be a board admin.","mcp":{"enabled":true,"name":"update_table","description":"Rename a table on a board"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"boardId":{"type":"string"}},"required":["_id","name","boardId"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"delete":{"summary":"Delete Board Table","tags":["API Reference","public","board","table"],"description":"Delete a table from a board, including its rows. Requires board admin. This cannot be undone.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Delete Board Table","description":"Delete a table and its rows from a board"},"content":"## Overview\n\nDeletes the table and its rows. The token user must be a board admin. There is no undo.","mcp":{"enabled":true,"name":"delete_table","description":"Delete a table and its rows from a board"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"get":{"summary":"Get Board Table","tags":["API Reference","public","board","table"],"description":"Retrieve details of a specific table inside a board using boardId and tableId.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Table Details","description":"Retrieve detailed information about a specific table"},"content":"## Prerequisites\n\n- Valid API key with board read permissions\n- Board ID and Table ID\n\n## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The specific table to retrieve\n\n## Response\n\nReturns table details including column definitions and metadata. For STATUS, DROPDOWN, and LABELS columns, an `options` array is included.","mcp":{"enabled":true,"name":"get_board_table","description":"Get details of a specific table in a board"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst table = await copera.board.getBoardTable({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here'\n});\nconsole.log(table);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"board":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"order":{"type":"number"},"options":{"description":"Options for STATUS, DROPDOWN, or LABELS column types","type":"array","items":{"type":"object","properties":{"optionId":{"description":"Unique identifier for the option","type":"string"},"label":{"description":"Display label for the option","type":"string"},"color":{"description":"Color code for the option (e.g., RED, BLUE, GREEN)","type":"string"},"order":{"description":"Sort order of the option","type":"number"},"statusGroup":{"description":"Status group classification (only for STATUS columns)","anyOf":[{"type":"string","enum":["TODO"]},{"type":"string","enum":["IN_PROGRESS"]},{"type":"string","enum":["DONE"]}]}},"required":["optionId","order"]}},"tableRef":{"description":"LINK columns only: the foreign table's ObjectId this column links to.","type":"string"},"linkMode":{"description":"LINK columns only: whether a cell holds a single linked row or many.","anyOf":[{"type":"string","enum":["SINGLE"]},{"type":"string","enum":["MULTI"]}]},"displayColumnId":{"description":"LINK columns only: the column in the foreign table shown as the link chip label.","type":"string"},"formula":{"description":"FORMULA columns only: the formula expression.","type":"string"},"linkColumnId":{"description":"LOOKUP/ROLLUP columns only: the LINK column in this table supplying the relationship.","type":"string"},"originColumnId":{"description":"LOOKUP/ROLLUP columns only: the column in the linked table being looked up.","type":"string"},"aggregator":{"description":"ROLLUP columns only: the aggregation function (SUM, AVERAGE, MEDIAN, MIN, MAX, COUNT, ...).","type":"string"}},"required":["columnId","label","type"]}}},"required":["_id","name","board","createdAt","updatedAt","columns"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/column":{"post":{"summary":"Create Table Column","tags":["API Reference","public","board","table"],"description":"Add a column to a table. Supports the common column types; status/dropdown/labels columns accept initial options.","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"additionalProperties":false,"type":"object","properties":{"label":{"minLength":1,"maxLength":240,"description":"Column label (1–200 characters after trim; transport allows bounded padding).","type":"string"},"type":{"anyOf":[{"type":"string","enum":["TEXT"]},{"type":"string","enum":["PARAGRAPH"]},{"type":"string","enum":["NUMBER"]},{"type":"string","enum":["MONEY"]},{"type":"string","enum":["DATE"]},{"type":"string","enum":["EMAIL"]},{"type":"string","enum":["PHONE"]},{"type":"string","enum":["WEBSITE"]},{"type":"string","enum":["CHECKBOX"]},{"type":"string","enum":["STATUS"]},{"type":"string","enum":["DROPDOWN"]},{"type":"string","enum":["LABELS"]},{"type":"string","enum":["USERS"]},{"type":"string","enum":["CONTACT"]},{"type":"string","enum":["LOCATION"]},{"type":"string","enum":["DESCRIPTION"]},{"type":"string","enum":["FILE"]},{"type":"string","enum":["CHECKLIST"]},{"type":"string","enum":["LINK"]},{"type":"string","enum":["LOOKUP"]},{"type":"string","enum":["ROLLUP"]},{"type":"string","enum":["FORMULA"]}]},"options":{"maxItems":100,"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"label":{"minLength":1,"maxLength":240,"description":"Option label (1–200 characters after trim; transport allows bounded padding).","type":"string"},"color":{"maxLength":70,"description":"Option color (max 50 after trim; transport allows bounded padding).","type":"string"},"order":{"description":"Sort order for this option.","type":"number"},"statusGroup":{"description":"Status group classification. STATUS columns only.","anyOf":[{"type":"string","enum":["TODO"]},{"type":"string","enum":["IN_PROGRESS"]},{"type":"string","enum":["DONE"]}]}},"required":["label"]}},"format":{"anyOf":[{"anyOf":[{"type":"string","enum":["DATE_EU"]},{"type":"string","enum":["DATE_EU_24"]},{"type":"string","enum":["DATE_ISO"]},{"type":"string","enum":["DATE_ISO_24"]},{"type":"string","enum":["DATE_TIME"]},{"type":"string","enum":["DATE_TIME_EU"]},{"type":"string","enum":["DATE_TIME_EU_24"]},{"type":"string","enum":["DATE_TIME_ISO"]},{"type":"string","enum":["DATE_TIME_ISO_24"]},{"type":"string","enum":["DATE_TIME_SHORT"]},{"type":"string","enum":["DATE_TIME_US"]},{"type":"string","enum":["DATE_TIME_US_24"]},{"type":"string","enum":["DATE_US"]},{"type":"string","enum":["DATE_US_24"]}]},{"anyOf":[{"type":"string","enum":["CURRENCY_BRL"]},{"type":"string","enum":["CURRENCY_BTC"]},{"type":"string","enum":["CURRENCY_ETH"]},{"type":"string","enum":["CURRENCY_EUR"]},{"type":"string","enum":["CURRENCY_GBP"]},{"type":"string","enum":["CURRENCY_JPY"]},{"type":"string","enum":["CURRENCY_USD"]}]}]},"numberOptions":{"additionalProperties":false,"type":"object","properties":{"decimalPlaces":{"type":"number"},"prefix":{"type":"string"},"suffix":{"type":"string"},"separator":{"anyOf":[{"type":"string","enum":["NONE"]},{"type":"string","enum":["LOCAL"]},{"type":"string","enum":["SPACE_COMMA"]},{"type":"string","enum":["SPACE_PERIOD"]},{"type":"string","enum":["PERIOD_COMMA"]},{"type":"string","enum":["COMMA_PERIOD"]}]},"allowNegative":{"type":"boolean"},"abbreviation":{"anyOf":[{"type":"string","enum":["NONE"]},{"type":"string","enum":["K"]},{"type":"string","enum":["M"]},{"type":"string","enum":["B"]}]},"showProgressBar":{"type":"boolean"},"durationFormat":{"anyOf":[{"type":"string","enum":["h:mm"]},{"type":"string","enum":["h:mm:ss"]},{"type":"string","enum":["h:mm:ss.s"]},{"type":"string","enum":["h:mm:ss.ss"]},{"type":"string","enum":["h:mm:ss.sss"]}]},"percentScale":{"anyOf":[{"type":"string","enum":["FRACTION"]},{"type":"string","enum":["WHOLE"]}]}}},"defaultValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]},"formula":{"minLength":1,"description":"FORMULA expression or ROLLUP custom override formula, e.g. field('<column_id>') * 1.1. Function names are UPPERCASE-only.","type":"string"},"tableRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"syncLink":{"type":"boolean"},"linkMode":{"anyOf":[{"type":"string","enum":["SINGLE"]},{"type":"string","enum":["MULTI"]}]},"maxLinks":{"minimum":1,"type":"integer"},"displayColumnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"restrictToViewId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"linkingColumnRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"columnRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"aggregator":{"anyOf":[{"type":"string","enum":["SUM"]},{"type":"string","enum":["AVERAGE"]},{"type":"string","enum":["MEDIAN"]},{"type":"string","enum":["MIN"]},{"type":"string","enum":["MAX"]},{"type":"string","enum":["COUNT"]},{"type":"string","enum":["COUNT_UNIQUE"]},{"type":"string","enum":["CONCAT"]},{"type":"string","enum":["EARLIEST"]},{"type":"string","enum":["LATEST"]},{"type":"string","enum":["AND"]},{"type":"string","enum":["OR"]},{"type":"string","enum":["COUNT_A"]},{"type":"string","enum":["COUNT_EMPTY"]},{"type":"string","enum":["PERCENT_EMPTY"]},{"type":"string","enum":["PERCENT_FILLED"]}]},"filter":{"additionalProperties":false,"type":"object","properties":{"conditions":{"minItems":1,"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"columnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"valueType":{"anyOf":[{"type":"string","enum":["STRING"]},{"type":"string","enum":["NUMBER"]},{"type":"string","enum":["BOOL"]},{"type":"string","enum":["DATE"]},{"type":"string","enum":["SELECT"]}]},"operator":{"description":"Filter operator matching valueType's vocabulary, e.g. STRING: CONTAINS|ENDS_WITH|EQUALS|NOT_CONTAINS|NOT_EQUAL|STARTS_WITH; NUMBER: EQUALS|INCLUDES|MAX|MAX_EQUALS|MIN|MIN_EQUALS|NOT_EQUALS|NOT_INCLUDES; DATE: AFTER|BEFORE|CURRENT_MONTH|CURRENT_WEEK|DATE|EQUALS|LAST_MONTH|LAST_SEVEN_DAYS|LAST_WEEK|NEXT_MONTH|NEXT_SEVEN_DAYS|NEXT_WEEK|NOT_EQUALS|RANGE|TODAY|TOMORROW|YESTERDAY; SELECT/BOOL (compare): EQUALS|INCLUDES|NOT_EQUAL|NOT_INCLUDES.","type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]},"date":{"format":"date-time","type":"string"},"dateStart":{"format":"date-time","type":"string"},"dateEnd":{"format":"date-time","type":"string"}},"required":["columnId","valueType","operator"]}},"matchStrategy":{"description":"Required when conditions has more than one entry — both the Mongo compiler and the in-memory matcher default an absent value to OR.","anyOf":[{"type":"string","enum":["AND"]},{"type":"string","enum":["OR"]}]}},"required":["conditions"]}},"required":["label","type"]},{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["TEXT"]},{"type":"string","enum":["PARAGRAPH"]},{"type":"string","enum":["NUMBER"]},{"type":"string","enum":["MONEY"]},{"type":"string","enum":["DATE"]},{"type":"string","enum":["EMAIL"]},{"type":"string","enum":["PHONE"]},{"type":"string","enum":["WEBSITE"]},{"type":"string","enum":["CHECKBOX"]},{"type":"string","enum":["STATUS"]},{"type":"string","enum":["DROPDOWN"]},{"type":"string","enum":["LABELS"]},{"type":"string","enum":["USERS"]},{"type":"string","enum":["CONTACT"]},{"type":"string","enum":["LOCATION"]},{"type":"string","enum":["DESCRIPTION"]},{"type":"string","enum":["FILE"]},{"type":"string","enum":["CHECKLIST"]}]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["FORMULA"]},"formula":{"minLength":1,"description":"FORMULA expression or ROLLUP custom override formula, e.g. field('<column_id>') * 1.1. Function names are UPPERCASE-only.","type":"string"}},"required":["type","formula"]},{"type":"object","properties":{"type":{"type":"string","enum":["LINK"]},"tableRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}},"required":["type","tableRef"]},{"type":"object","properties":{"type":{"type":"string","enum":["LOOKUP"]},"linkingColumnRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"columnRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}},"required":["type","linkingColumnRef","columnRef"]},{"type":"object","properties":{"type":{"type":"string","enum":["ROLLUP"]},"linkingColumnRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"columnRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"aggregator":{"anyOf":[{"type":"string","enum":["SUM"]},{"type":"string","enum":["AVERAGE"]},{"type":"string","enum":["MEDIAN"]},{"type":"string","enum":["MIN"]},{"type":"string","enum":["MAX"]},{"type":"string","enum":["COUNT"]},{"type":"string","enum":["COUNT_UNIQUE"]},{"type":"string","enum":["CONCAT"]},{"type":"string","enum":["EARLIEST"]},{"type":"string","enum":["LATEST"]},{"type":"string","enum":["AND"]},{"type":"string","enum":["OR"]},{"type":"string","enum":["COUNT_A"]},{"type":"string","enum":["COUNT_EMPTY"]},{"type":"string","enum":["PERCENT_EMPTY"]},{"type":"string","enum":["PERCENT_FILLED"]}]},"formula":{"not":{}}},"required":["type","linkingColumnRef","columnRef","aggregator"]},{"type":"object","properties":{"type":{"type":"string","enum":["ROLLUP"]},"linkingColumnRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"columnRef":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"formula":{"minLength":1,"description":"FORMULA expression or ROLLUP custom override formula, e.g. field('<column_id>') * 1.1. Function names are UPPERCASE-only.","type":"string"},"aggregator":{"not":{}}},"required":["type","linkingColumnRef","columnRef","formula"]}]}]}}}},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Create Table Column","description":"Add a column to a table, with options for select types"},"content":"## Overview\n\nCreates a column on the table. Column types are exact uppercase values such as `TEXT`, `DATE`, `STATUS`, `FILE`, and `CONTACT` (cell value is an array of contact IDs). For `STATUS`/`DROPDOWN`/`LABELS`, pass `options` to seed the choices — each option may also set `order` and (STATUS only) `statusGroup` (`TODO`/`IN_PROGRESS`/`DONE`). `LINK`, `LOOKUP`, `ROLLUP`, and `FORMULA` are also creatable — see their dedicated fields below. SLA columns are not yet available through the public API.\n\n## Request Body\n\n- `label` (required): Column name\n- `type` (required): One of the supported types above\n- `options` (optional): `[{ label, color?, order?, statusGroup? }]` — select-style types only\n- `format` (optional): DATE columns take a `DATE_*`/`DATE_TIME_*` value (e.g. `DATE_ISO`); MONEY columns take a `CURRENCY_*` value (e.g. `CURRENCY_USD`) — a currency format on a DATE column (or vice versa) is rejected\n- `numberOptions` (optional, NUMBER/MONEY only): `{ decimalPlaces?, prefix?, suffix?, separator?, allowNegative?, abbreviation?, showProgressBar?, percentScale? }` — display configuration such as a currency prefix, thousands separator, or progress bar\n- `defaultValue` (optional): the value new rows start with — not accepted on FORMULA, LINK, LOOKUP, ROLLUP, FILE, LOCATION, DESCRIPTION, or CHECKLIST columns\n- `tableRef` (required for LINK): the target table's ObjectId\n- `linkingColumnRef` + `columnRef` (required for LOOKUP/ROLLUP): the local LINK column and the target-table column to read/aggregate\n- `formula` (required for FORMULA; optional custom override for ROLLUP): a formula expression, e.g. `field('<column_id>') * 1.1`","mcp":{"enabled":true,"name":"create_column","description":"Add a column to a table"}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST \"https://api.copera.ai/public/v1/board/BOARD_ID/table/TABLE_ID/column\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"label\":\"Status\",\"type\":\"STATUS\",\"options\":[{\"label\":\"To do\"},{\"label\":\"Doing\"},{\"label\":\"Done\"}]}'"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"columnId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"format":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"label":{"type":"string"},"color":{"type":"string"},"order":{"description":"Sort order of the option (always present at runtime).","type":"number"},"statusGroup":{"type":"string"}},"required":["optionId","order"]}},"numberOptions":{"additionalProperties":false,"type":"object","properties":{"decimalPlaces":{"type":"number"},"prefix":{"type":"string"},"suffix":{"type":"string"},"separator":{"type":"string"},"allowNegative":{"type":"boolean"},"abbreviation":{"type":"string"},"showProgressBar":{"type":"boolean"},"durationFormat":{"type":"string"},"percentScale":{"type":"string"}}},"defaultValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"required":["columnId","label","type"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/column/{columnId}":{"patch":{"summary":"Update Table Column","tags":["API Reference","public","board","table"],"description":"Rename a column and/or add, rename, recolor, reorder, or remove options on a select-style column.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"label":{"minLength":1,"maxLength":240,"description":"New label (1–200 after trim; transport allows bounded padding).","type":"string"},"addOptions":{"maxItems":100,"minItems":1,"description":"Options to append (at least one when present) — select-style columns only.","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"label":{"minLength":1,"maxLength":240,"description":"Option label (1–200 characters after trim; transport allows bounded padding).","type":"string"},"color":{"maxLength":70,"description":"Option color (max 50 after trim; transport allows bounded padding).","type":"string"}},"required":["label"]}},"updateOptions":{"maxItems":100,"minItems":1,"description":"Rename/recolor/reorder existing options, or set statusGroup, by optionId — select-style columns only.","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"optionId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"label":{"minLength":1,"maxLength":240,"description":"New option label (1–200 characters after trim; transport allows bounded padding).","type":"string"},"color":{"maxLength":70,"description":"New option color (max 50 after trim; transport allows bounded padding).","type":"string"},"order":{"description":"New sort order for this option.","type":"number"},"statusGroup":{"description":"Status group classification. STATUS columns only.","anyOf":[{"type":"string","enum":["TODO"]},{"type":"string","enum":["IN_PROGRESS"]},{"type":"string","enum":["DONE"]}]}},"required":["optionId"]}},"deleteOptionIds":{"maxItems":100,"minItems":1,"description":"Option ids to remove — select-style columns only. Every other option not listed here is left untouched.","type":"array","items":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}}}}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"columnId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Update Table Column","description":"Rename a column or manage select options (add, rename, recolor, reorder, delete, statusGroup)"},"content":"## Overview\n\nUpdates the column's label and/or its options on a status/dropdown/labels column: `addOptions` appends new options, `updateOptions` renames/recolors/reorders an existing option (or sets `statusGroup` on a STATUS column) by `optionId`, and `deleteOptionIds` removes options by id. Every operation is keyed explicitly — an option not named in `updateOptions`/`deleteOptionIds` is always left untouched. At least one of `label`, `addOptions`, `updateOptions`, or `deleteOptionIds` is required. The column type cannot be changed through this endpoint.","mcp":{"enabled":true,"name":"update_column","description":"Rename a column or manage its select options"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"columnId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"format":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"label":{"type":"string"},"color":{"type":"string"},"order":{"description":"Sort order of the option (always present at runtime).","type":"number"},"statusGroup":{"type":"string"}},"required":["optionId","order"]}},"numberOptions":{"additionalProperties":false,"type":"object","properties":{"decimalPlaces":{"type":"number"},"prefix":{"type":"string"},"suffix":{"type":"string"},"separator":{"type":"string"},"allowNegative":{"type":"boolean"},"abbreviation":{"type":"string"},"showProgressBar":{"type":"boolean"},"durationFormat":{"type":"string"},"percentScale":{"type":"string"}}},"defaultValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"required":["columnId","label","type"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"delete":{"summary":"Delete Table Column","tags":["API Reference","public","board","table"],"description":"Delete a column. Cascades to dependent LOOKUP/ROLLUP columns, views, dashboard widgets, and automations that reference it.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"columnId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Delete Table Column","description":"Delete a table column and its dependents"},"content":"## Overview\n\nDeletes the column. This is permanent and cascades: dependent LOOKUP/ROLLUP columns anywhere in the workspace are deleted, Gantt/Calendar/Workload views that reference the column outright are deleted, and the column is stripped from view filters/sorts/groupBy, dashboard widgets, and automations. The table's system title column cannot be deleted.\n\n## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the column\n- `columnId`: The column to delete\n\n## Response\n\nReturns a success confirmation.","mcp":{"enabled":true,"name":"delete_column","description":"Delete a table column and its dependents"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/tables":{"get":{"summary":"List Board Tables","tags":["API Reference","public","board","table"],"description":"Retrieve all tables associated with the specified board.","parameters":[{"schema":{"maxLength":200,"type":"string"},"in":"query","name":"q","required":false,"description":"Case-insensitive search query."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"List Board Tables","description":"Get all tables within a board"},"content":"## Overview\n\nReturns all tables associated with the specified board. Each table contains columns that define the structure of data.\n\nPass `q` to filter by table name.\n\n## Response\n\nReturns an array of table objects with:\n- Table ID and name\n- Associated board ID\n- Column definitions (columnId, label, type, order, options)\n- Timestamps\n\nNote: For STATUS, DROPDOWN, and LABELS columns, an `options` array is included with each option containing optionId, label, color, order, and statusGroup (for STATUS columns only).","mcp":{"enabled":true,"name":"list_board_tables","description":"List all tables in a board"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst tables = await copera.board.listBoardTables('board_id_here');\nconsole.log(tables);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"board":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"order":{"type":"number"},"options":{"description":"Options for STATUS, DROPDOWN, or LABELS column types","type":"array","items":{"type":"object","properties":{"optionId":{"description":"Unique identifier for the option","type":"string"},"label":{"description":"Display label for the option","type":"string"},"color":{"description":"Color code for the option (e.g., RED, BLUE, GREEN)","type":"string"},"order":{"description":"Sort order of the option","type":"number"},"statusGroup":{"description":"Status group classification (only for STATUS columns)","anyOf":[{"type":"string","enum":["TODO"]},{"type":"string","enum":["IN_PROGRESS"]},{"type":"string","enum":["DONE"]}]}},"required":["optionId","order"]}},"tableRef":{"description":"LINK columns only: the foreign table's ObjectId this column links to.","type":"string"},"linkMode":{"description":"LINK columns only: whether a cell holds a single linked row or many.","anyOf":[{"type":"string","enum":["SINGLE"]},{"type":"string","enum":["MULTI"]}]},"displayColumnId":{"description":"LINK columns only: the column in the foreign table shown as the link chip label.","type":"string"},"formula":{"description":"FORMULA columns only: the formula expression.","type":"string"},"linkColumnId":{"description":"LOOKUP/ROLLUP columns only: the LINK column in this table supplying the relationship.","type":"string"},"originColumnId":{"description":"LOOKUP/ROLLUP columns only: the column in the linked table being looked up.","type":"string"},"aggregator":{"description":"ROLLUP columns only: the aggregation function (SUM, AVERAGE, MEDIAN, MIN, MAX, COUNT, ...).","type":"string"}},"required":["columnId","label","type"]}}},"required":["_id","name","board","createdAt","updatedAt","columns"]}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/rows":{"get":{"summary":"List Table Rows","tags":["API Reference","public","board","table","row"],"description":"Retrieve rows belonging to the specified table inside a board. Supports optional filter and sort query parameters. Omit BOTH offset and limit for the legacy response (a bare array of every matching row); pass either one to opt into the paginated envelope response.","parameters":[{"schema":{"maxLength":200,"type":"string"},"in":"query","name":"q","required":false,"description":"Case-insensitive row search across searchable table columns."},{"schema":{"type":"string"},"in":"query","name":"filter","required":false,"description":"JSON filter as a string, e.g. {\"match\":\"and\",\"conditions\":[{\"column_id\":\"…\",\"operator\":\"contains\",\"value\":\"foo\"}]}. See the list-table-rows endpoint docs for the full operator catalog."},{"schema":{"type":"string"},"in":"query","name":"sort","required":false,"description":"Comma-separated sort spec, e.g. \"col_a:asc,col_b:desc\". Defaults to no sorting."},{"schema":{"minimum":0,"type":"number"},"in":"query","name":"offset","required":false,"description":"Number of matching rows to skip. Defaults to 0."},{"schema":{"minimum":1,"maximum":1000,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max rows per page (1-1000). Defaults to 200."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"List Table Rows","description":"Get rows from a table, optionally filtered and sorted"},"content":"## Overview\n\nRetrieves rows (records) from the specified table. Each row contains values for the table's columns.\n\nYou can optionally search, filter, and sort the result with the `q`, `filter`, and `sort` query parameters.\n\n## Search\n\nPass `q` to run a case-insensitive search across searchable table columns. This uses the same indexed table search path as the web grid.\n\n## Filtering\n\nPass a JSON object as the `filter` query parameter:\n\n```json\n{\n  \"match\": \"and\",\n  \"conditions\": [\n    { \"column_id\": \"col_abc\", \"operator\": \"contains\", \"value\": \"foo\" },\n    { \"column_id\": \"col_xyz\", \"operator\": \"between\", \"value\": [\"2026-01-01\", \"2026-12-31\"] },\n    { \"column_id\": \"col_empty\", \"operator\": \"is_empty\" }\n  ]\n}\n```\n\n- `match`: `\"and\"` (default) or `\"or\"` — how to combine multiple conditions.\n- `conditions[]`: up to 20 conditions. Each has `column_id`, `operator`, and (for most operators) `value`.\n\n### Operators by column type\n\n| Column type | Operators |\n|---|---|\n| string | `equals`, `not_equals`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty` |\n| number | `equals`, `not_equals`, `gt`, `gte`, `lt`, `lte`, `includes`, `not_includes`, `is_empty`, `is_not_empty` |\n| select (status / dropdown / labels) | `equals`, `not_equals`, `includes`, `not_includes`, `is_empty`, `is_not_empty` |\n| checklist | `is_complete`, `is_not_complete`, `is_empty`, `is_not_empty` |\n| bool | `equals`, `not_equals`, `is_empty`, `is_not_empty` |\n| date | `equals`, `before`, `after`, `between`, `today`, `yesterday`, `tomorrow`, `next_7_days`, `last_7_days`, `current_week`, `last_week`, `next_week`, `current_month`, `last_month`, `next_month`, `is_empty`, `is_not_empty` |\n\n### Value shape\n\n- string operators take a string `value`.\n- number operators take a number `value`; `includes` / `not_includes` take `number[]`.\n- select operators take a single string or `string[]` of option IDs.\n- date `equals`/`before`/`after` take an ISO date string; `between` takes a `[startISO, endISO]` tuple; the relative operators (`today`, `current_week`, ...) take no `value`.\n- `is_empty` / `is_not_empty` take no `value`.\n\n## Sorting\n\nPass a comma-separated spec as the `sort` query parameter:\n\n```\nsort=col_a:asc,col_b:desc\n```\n\nEach entry is `<columnId>:asc` or `<columnId>:desc`. Sorting by password columns is not allowed. Every page is additionally tiebroken by a stable row id, so pages stay deterministic across requests.\n\n## Pagination (opt-in)\n\nBy default (no `offset` and no `limit`) this endpoint returns every matching row as a bare array — the original response shape, preserved for backward compatibility.\n\nPass `offset` and/or `limit` (max `1000`) to opt into the paginated envelope response instead. Use `offset` to read beyond a page; `total`/`hasMore` in the response tell you how many rows match overall and whether more remain. Omitting one of the two while providing the other still switches to envelope mode, using `offset=0`/`limit=200` for the missing one.\n\n## Response\n\n**Legacy mode** (no `offset`/`limit` on the request) — returns a bare array of row objects.\n\n**Paginated mode** (`offset` and/or `limit` present) — returns `{ rows, total, offset, limit, hasMore }`.\n\nIn both modes, each row object has:\n- Row ID and internal rowId number\n- Owner id, resolved owner display name (`ownerName`, when resolvable)\n- Timestamps\n- Column values (`columnId`/`value` pairs), each additionally carrying a resolved `displayValue` for STATUS/DROPDOWN/LABELS options and USERS cells","mcp":{"enabled":true,"name":"list_table_rows","description":"List a page of rows in a table, optionally filtered and sorted via the filter and sort query parameters"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst page = await copera.board.listTableRows({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  filter: {\n    match: 'and',\n    conditions: [\n      { column_id: 'col_status', operator: 'equals', value: ['opt_done'] },\n      { column_id: 'col_due',    operator: 'before', value: '2026-12-31' }\n    ]\n  },\n  sort: [{ column: 'col_due', dir: 'asc' }],\n  offset: 0,\n  limit: 200\n});\nconsole.log(page.rows, page.total, page.hasMore);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"owner":{"type":"string"},"ownerName":{"description":"Display name of the row owner.","type":"string"},"table":{"type":"string"},"board":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"value":{},"linkValue":{},"lookupValue":{"type":"array","items":{"type":"object","properties":{"foreignRowId":{"type":"string"},"foreignRowValue":{}},"required":["foreignRowId","foreignRowValue"]}},"displayValue":{"description":"Human label for the cell's raw value — resolved option label(s) for STATUS/DROPDOWN/LABELS, resolved user name(s) for USERS. Omitted when the column type has no display mapping. Always a string, an array of strings, or absent — never any other shape.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["columnId"]}}},"required":["_id","rowId","owner","table","board","createdAt","updatedAt","columns"]}},{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"owner":{"type":"string"},"ownerName":{"description":"Display name of the row owner.","type":"string"},"table":{"type":"string"},"board":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"value":{},"linkValue":{},"lookupValue":{"type":"array","items":{"type":"object","properties":{"foreignRowId":{"type":"string"},"foreignRowValue":{}},"required":["foreignRowId","foreignRowValue"]}},"displayValue":{"description":"Human label for the cell's raw value — resolved option label(s) for STATUS/DROPDOWN/LABELS, resolved user name(s) for USERS. Omitted when the column type has no display mapping. Always a string, an array of strings, or absent — never any other shape.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["columnId"]}}},"required":["_id","rowId","owner","table","board","createdAt","updatedAt","columns"]}},"total":{"description":"Total rows matching the query.","type":"number"},"offset":{"description":"Offset applied to this page.","type":"number"},"limit":{"description":"Max rows requested for this page.","type":"number"},"hasMore":{"description":"Whether more rows exist beyond this page.","type":"boolean"}},"required":["rows","total","offset","limit","hasMore"]}]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/views":{"get":{"summary":"List Table Views","tags":["API Reference","public","board","table","view"],"description":"List a table's views (Grid, Kanban, Gantt, ...), including a human summary of each view's filter/group/sort configuration.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"List Table Views","description":"Get the views configured on a table"},"content":"## Overview\n\nReturns every view the caller can read on the specified table, ordered the same way the table's view tabs are ordered. Private views are included only when the caller is the owner or a shared participant.\n\n## Response\n\nReturns an array of view objects with:\n- `viewId` and `name`\n- `type` (GRID, KANBAN, GANTT, TIMELINE, CALENDAR, FORM, WORKLOAD, TODO, LIST)\n- `isDefault` — whether this is the table's default view (used when `copera_export_table`/an endpoint omits `viewId`)\n- `filterSummary` — human summary of the view's filter, e.g. \"2 conditions on Status, Due date\"\n- `groupBy` — `{ columnId, label }` when the view groups rows\n- `sortBy` — `[{ columnId, label, direction }]` when the view sorts rows","mcp":{"enabled":true,"name":"list_table_views","description":"List the views configured on a table"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst views = await copera.board.listTableViews({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here'\n});\nconsole.log(views);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"viewId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"isDefault":{"description":"Whether this is the table's default view (lowest order — used when an endpoint/tool omits viewId).","type":"boolean"},"filterSummary":{"description":"Human summary of the view's filter, e.g. \"2 conditions on Status, Due date\". Omitted when the view has no filter.","type":"string"},"groupBy":{"type":"object","properties":{"columnId":{"type":"string"},"label":{"type":"string"}},"required":["columnId","label"]},"sortBy":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"label":{"type":"string"},"direction":{"anyOf":[{"type":"string","enum":["asc"]},{"type":"string","enum":["desc"]}]}},"required":["columnId","label","direction"]}}},"required":["viewId","name","type","isDefault"]}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/rows/aggregate":{"post":{"summary":"Aggregate Table Rows","tags":["API Reference","public","board","table","row"],"description":"Compute COUNT/SUM/AVERAGE/MIN/MAX/MEDIAN/DISTINCT metrics over a table's rows, optionally grouped by one column.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"metrics":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"description":"Stable id for this metric in the response.","type":"string"},"type":{"description":"Aggregation function.","anyOf":[{"type":"string","enum":["COUNT"]},{"type":"string","enum":["SUM"]},{"type":"string","enum":["AVERAGE"]},{"type":"string","enum":["MIN"]},{"type":"string","enum":["MAX"]},{"type":"string","enum":["MEDIAN"]},{"type":"string","enum":["DISTINCT"]}]},"columnId":{"description":"Required unless type is COUNT.","type":"string"},"label":{"maxLength":120,"type":"string"}},"required":["type"]}},"groupBy":{"type":"object","properties":{"columnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"dateGranularity":{"description":"Required when columnId is a DATE column.","type":"string"},"topN":{"minimum":1,"maximum":50,"type":"integer"},"includeOther":{"type":"boolean"}},"required":["columnId"]},"filter":{"description":"Same public filter dialect as GET rows: {match, conditions: [{column_id, operator, value}]}.","type":"object","properties":{"match":{"anyOf":[{"type":"string","enum":["and"]},{"type":"string","enum":["or"]}]},"conditions":{"type":"array","items":{"type":"object","properties":{"column_id":{"type":"string"},"operator":{"type":"string"},"value":{}},"required":["column_id","operator"]}}},"required":["conditions"]}},"required":["metrics"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Aggregate Table Rows","description":"Compute metrics over table rows, optionally grouped by a column"},"content":"## Overview\n\nRuns the same server-side aggregation pipeline Dashboards V2 charts use — this is the way to answer reporting questions (\"how much time did each person log per client\") without paging through raw rows.\n\n## Request body\n\n- `metrics` (1-5): each `{ id?, type, columnId?, label? }`. `type` is one of COUNT, SUM, AVERAGE, MIN, MAX, MEDIAN, DISTINCT. `columnId` is required for every type except COUNT.\n- `groupBy` (optional): `{ columnId, dateGranularity?, topN?, includeOther? }`. Supports LINK (groups by the linked row), LOOKUP (groups by the looked-up value), SELECT/STATUS/DROPDOWN, USERS, and DATE columns (with `dateGranularity`: day/week/month/quarter/year). `topN` caps categories (max 50, default 20); the remainder rolls into an \"Other\" bucket unless `includeOther: false`.\n- `filter` (optional): same public filter dialect as `GET .../rows` — `{ match, conditions: [{ column_id, operator, value }] }`.\n\n## Response\n\n- `totals`: each metric computed over every matched row, ignoring `groupBy`.\n- `groups`: one entry per category (empty when no `groupBy` was sent), each with its own per-metric values. `totalGroups`/`truncated` describe whether `topN` cut off any categories.","mcp":{"enabled":true,"name":"aggregate_rows","description":"Aggregate table rows (sum/average/count/min/max/median/distinct), optionally grouped by a column"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst report = await copera.board.aggregateBoardTableRows({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  metrics: [{ type: 'SUM', columnId: 'col_hours_logged', label: 'Hours logged' }],\n  groupBy: { columnId: 'col_assignee', topN: 10 }\n});\nconsole.log(report.groups, report.totals);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"description":"Empty when the request had no groupBy.","type":"array","items":{"type":"object","properties":{"key":{"description":"Raw group key. \"__other\" for the rolled-up bucket.","type":"string"},"label":{"description":"Human-readable group label.","type":"string"},"metrics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"description":"COUNT | SUM | AVERAGE | MIN | MAX | MEDIAN | DISTINCT.","type":"string"},"columnId":{"type":"string"},"label":{"type":"string"},"value":{"description":"Null when the metric has no computable value (e.g. AVERAGE over zero rows).","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","type","label","value"]}}},"required":["key","label","metrics"]}},"totalGroups":{"description":"Distinct category count before the topN cap was applied.","type":"number"},"truncated":{"description":"True when more categories exist than topN kept.","type":"boolean"},"totals":{"description":"Metrics computed over every matched row, ignoring groupBy.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"description":"COUNT | SUM | AVERAGE | MIN | MAX | MEDIAN | DISTINCT.","type":"string"},"columnId":{"type":"string"},"label":{"type":"string"},"value":{"description":"Null when the metric has no computable value (e.g. AVERAGE over zero rows).","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","type","label","value"]}}},"required":["groups","totalGroups","truncated","totals"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/{rowId}":{"get":{"summary":"Get Table Row","tags":["API Reference","public","board","table","row"],"description":"Retrieve a single row using boardId, tableId, and the row's internal ObjectId.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Table Row","description":"Retrieve a specific row from a table"},"content":"## Prerequisites\n\n- Valid API key with board read permissions\n- Board ID, Table ID, and Row ID\n\n## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The specific row to retrieve\n\n## Response\n\nReturns a single row object with all column values.","mcp":{"enabled":true,"name":"get_table_row","description":"Get a specific row from a table"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst row = await copera.board.getTableRow({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowId: 'row_id_here'\n});\nconsole.log(row);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"owner":{"type":"string"},"ownerName":{"description":"Display name of the row owner.","type":"string"},"table":{"type":"string"},"board":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"value":{},"linkValue":{},"lookupValue":{"type":"array","items":{"type":"object","properties":{"foreignRowId":{"type":"string"},"foreignRowValue":{}},"required":["foreignRowId","foreignRowValue"]}},"displayValue":{"description":"Human label for the cell's raw value — resolved option label(s) for STATUS/DROPDOWN/LABELS, resolved user name(s) for USERS. Omitted when the column type has no display mapping. Always a string, an array of strings, or absent — never any other shape.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["columnId"]}}},"required":["_id","rowId","owner","table","board","createdAt","updatedAt","columns"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"patch":{"summary":"Update Table Row","tags":["API Reference","public","board","table","row"],"description":"Update column values of an existing row in a table.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"value":{"description":"Cell value. Shape depends on the column type. For LINK columns, value MUST be an array of row id strings (`[]` clears the link); each id must exist in the LINK column's target table and belong to the same workspace. For CONTACT columns, value MUST be an array of contact id strings (`[]` clears the contacts); each contact must be live and belong to the same workspace. For CHECKLIST columns, value is an array of `{ id, text, checked, checkedAt?, checkedBy? }` items (max 200; progress displayed as `\"N/M\"`). For FILE columns, value references already-persisted workspace files: an attachment object `{ \"_id\": \"<fileId>\" }`, an array of them, or bare file-id strings (`[]` clears the cell); each file must belong to the same workspace, and its stored name/type/size are taken from the file itself. For DURATION columns, value MUST be a JSON number representing seconds (for example, `1800` for 30 minutes); formatted strings such as `\"00:30:00\"` are invalid."}},"required":["columnId","value"]}}},"required":["columns"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Update Table Row","description":"Update column values of a row in a table"},"content":"## Overview\n\nUpdates column values of an existing row in the specified table. Only the provided columns will be updated; other columns remain unchanged.\n\n## Request Body\n\n- `columns` (array, required): Array of column values to update\n  - `columnId`: The ID of the column to update\n  - `value`: The new value for that column (type depends on column definition). For DURATION columns, value MUST be a JSON number representing seconds (for example, `1800` for 30 minutes); formatted strings such as `\"00:30:00\"` are invalid.\n\n## Response\n\nReturns the updated row object with all column values.","mcp":{"enabled":true,"name":"update_table_row","description":"Update column values of a row in a table"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst updatedRow = await copera.board.updateTableRow({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowId: 'row_id_here',\n  columns: [\n    {\n      columnId: 'column_id_1',\n      value: 'Updated Value'\n    }\n  ]\n});\nconsole.log(updatedRow);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"owner":{"type":"string"},"ownerName":{"description":"Display name of the row owner.","type":"string"},"table":{"type":"string"},"board":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"value":{},"linkValue":{},"lookupValue":{"type":"array","items":{"type":"object","properties":{"foreignRowId":{"type":"string"},"foreignRowValue":{}},"required":["foreignRowId","foreignRowValue"]}},"displayValue":{"description":"Human label for the cell's raw value — resolved option label(s) for STATUS/DROPDOWN/LABELS, resolved user name(s) for USERS. Omitted when the column type has no display mapping. Always a string, an array of strings, or absent — never any other shape.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["columnId"]}}},"required":["_id","rowId","owner","table","board","createdAt","updatedAt","columns"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"delete":{"summary":"Delete Table Row","tags":["API Reference","public","board","table","row"],"description":"Delete a row from a table.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Delete Table Row","description":"Delete a row from a table"},"content":"## Overview\n\nDeletes a row (record) from the specified table. This action is permanent.\n\n## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The row to delete\n\n## Response\n\nReturns a success confirmation.","mcp":{"enabled":true,"name":"delete_table_row","description":"Delete a row from a table"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst result = await copera.board.deleteTableRow({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowId: 'row_id_here'\n});\nconsole.log(result);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row-number/{rowNumber}":{"get":{"summary":"Get Table Row by Row Number","tags":["API Reference","public","board","table","row"],"description":"Retrieve a single row using boardId, tableId, and the visible numeric row ID shown in the table.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[1-9][0-9]*$","type":"string"},"in":"path","name":"rowNumber","required":true,"description":"The visible numeric row ID shown in the table, for example 42."}],"x-mint":{"metadata":{"title":"Get Table Row by Row Number","description":"Retrieve a table row by its visible row number"},"content":"## Prerequisites\n\n- Valid API key with board read permissions\n- Board ID, Table ID, and the visible numeric row ID\n\n## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowNumber`: The visible numeric row ID shown in the table, for example `42`\n\n## Response\n\nReturns the same row object shape as the internal ObjectId row lookup.","mcp":{"enabled":true,"name":"get_table_row_by_row_number","description":"Get a specific row from a table by visible row number"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst row = await copera.board.getTableRowByRowNumber({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowNumber: 42\n});\nconsole.log(row);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"owner":{"type":"string"},"ownerName":{"description":"Display name of the row owner.","type":"string"},"table":{"type":"string"},"board":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"value":{},"linkValue":{},"lookupValue":{"type":"array","items":{"type":"object","properties":{"foreignRowId":{"type":"string"},"foreignRowValue":{}},"required":["foreignRowId","foreignRowValue"]}},"displayValue":{"description":"Human label for the cell's raw value — resolved option label(s) for STATUS/DROPDOWN/LABELS, resolved user name(s) for USERS. Omitted when the column type has no display mapping. Always a string, an array of strings, or absent — never any other shape.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["columnId"]}}},"required":["_id","rowId","owner","table","board","createdAt","updatedAt","columns"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row":{"post":{"summary":"Create Table Row","tags":["API Reference","public","board","table","row"],"description":"Create a new row in a table by providing optional markdown content for the row description and optional column values.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"description":"Optional markdown content for the row description. Sets the row description on creation.","type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"value":{"description":"Cell value. Shape depends on the column type. For LINK columns, value MUST be an array of row id strings (`[]` clears the link); each id must exist in the LINK column's target table and belong to the same workspace. For CONTACT columns, value MUST be an array of contact id strings (`[]` clears the contacts); each contact must be live and belong to the same workspace. For RICH TEXT columns, value MUST be a markdown string — it seeds the cell's rich text content (applied asynchronously). For CHECKLIST columns, value is an array of `{ id: string, text: string, checked: boolean, checkedAt?: string | null, checkedBy?: string | null }` items (max 200; progress is derived as checked/total and `displayValue` renders as `\"3/5\"`), e.g. `[{ \"id\": \"a1\", \"text\": \"Buy milk\", \"checked\": true }, { \"id\": \"a2\", \"text\": \"Ship box\", \"checked\": false }]`. For FILE columns, value references already-persisted workspace files: an attachment object `{ \"_id\": \"<fileId>\" }`, an array of them, or bare file-id strings (`[]` clears the cell); each file must belong to the same workspace, and its stored name/type/size are taken from the file itself. For DURATION columns, value MUST be a JSON number representing seconds (for example, `1800` for 30 minutes); formatted strings such as `\"00:30:00\"` are invalid."}},"required":["columnId","value"]}}},"required":["columns"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Create Table Row","description":"Add a new row to a table"},"content":"## Overview\n\nCreates a new row (record) in the specified table with optional markdown content for the row description and column values.\n\n## Request Body\n\n- `description` (optional): Markdown content for the row description. Sets the row's description on creation.\n- `columns` (array): Array of column values\n  - `columnId`: The ID of the column\n  - `value`: The value for that column (type depends on column definition). For DURATION columns, value MUST be a JSON number representing seconds (for example, `1800` for 30 minutes); formatted strings such as `\"00:30:00\"` are invalid.\n\n## Response\n\nReturns the newly created row object with generated ID and timestamps.","mcp":{"enabled":true,"name":"create_table_row","description":"Create a new row in a table"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst newRow = await copera.board.createTableRow({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  columns: [\n    {\n      columnId: 'column_id_1',\n      value: 'Value 1'\n    },\n    {\n      columnId: 'column_id_2',\n      value: 'Value 2'\n    }\n  ],\n  description: '# Row description\\nOptional markdown content.'\n});\nconsole.log(newRow);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"owner":{"type":"string"},"ownerName":{"description":"Display name of the row owner.","type":"string"},"table":{"type":"string"},"board":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"value":{},"linkValue":{},"lookupValue":{"type":"array","items":{"type":"object","properties":{"foreignRowId":{"type":"string"},"foreignRowValue":{}},"required":["foreignRowId","foreignRowValue"]}},"displayValue":{"description":"Human label for the cell's raw value — resolved option label(s) for STATUS/DROPDOWN/LABELS, resolved user name(s) for USERS. Omitted when the column type has no display mapping. Always a string, an array of strings, or absent — never any other shape.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["columnId"]}}},"required":["_id","rowId","owner","table","board","createdAt","updatedAt","columns"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/rows/bulk":{"post":{"summary":"Bulk Create Table Rows","tags":["API Reference","public","board","table","row"],"description":"Bulk-create rows in one table, either from an inline rows array (up to 1000) or by referencing a materialized row-query result set with a column mapping. Imports of 200 rows or fewer complete synchronously; larger imports run asynchronously and return a queued status immediately.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"description":"Either {kind:\"inline\", rows} or {kind:\"resultSet\", resultSetId, columnMapping, includeDescription?}.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"rows":{"minItems":1,"maxItems":1000,"description":"Inline row payloads (up to 1000 per request).","type":"array","items":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"value":{"description":"Cell value. Shape depends on the target column type — same rules as Create Table Row."}},"required":["columnId","value"]}},"description":{"description":"Optional markdown for this row's legacy description.","type":"string"}},"required":["columns"]}}},"required":["kind","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["resultSet"]},"resultSetId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"columnMapping":{"minItems":1,"description":"Maps each source column onto an existing target column (targetColumnId) or a brand-new one (createColumn).","type":"array","items":{"type":"object","properties":{"sourceColumnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"targetColumnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"createColumn":{"type":"object","properties":{"label":{"minLength":1,"maxLength":200,"type":"string"},"type":{"anyOf":[{"type":"string","enum":["TEXT"]},{"type":"string","enum":["PARAGRAPH"]},{"type":"string","enum":["NUMBER"]},{"type":"string","enum":["MONEY"]},{"type":"string","enum":["DATE"]},{"type":"string","enum":["EMAIL"]},{"type":"string","enum":["PHONE"]},{"type":"string","enum":["WEBSITE"]},{"type":"string","enum":["CHECKBOX"]},{"type":"string","enum":["STATUS"]},{"type":"string","enum":["DROPDOWN"]},{"type":"string","enum":["LABELS"]},{"type":"string","enum":["USERS"]},{"type":"string","enum":["CONTACT"]},{"type":"string","enum":["LOCATION"]},{"type":"string","enum":["DESCRIPTION"]},{"type":"string","enum":["FILE"]},{"type":"string","enum":["CHECKLIST"]}]},"options":{"maxItems":100,"description":"Initial options for STATUS/DROPDOWN/LABELS columns only.","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"label":{"minLength":1,"maxLength":240,"description":"Option label (1–200 characters after trim; transport allows bounded padding).","type":"string"},"color":{"maxLength":70,"description":"Option color (max 50 after trim; transport allows bounded padding).","type":"string"}},"required":["label"]}}},"required":["label","type"]}},"required":["sourceColumnId"]}},"includeDescription":{"type":"boolean"}},"required":["kind","resultSetId","columnMapping"]}]}},"required":["source"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Bulk Create Table Rows","description":"Import many rows into a table in one call"},"content":"## Overview\n\nTwo sources:\n\n- `{ \"kind\": \"inline\", \"rows\": [...] }` — up to 1000 row payloads using `{ columnId, value }` cells. DURATION cells are not currently supported on the bulk path; use Create Table Row for Duration values.\n- `{ \"kind\": \"resultSet\", \"resultSetId\": \"...\", \"columnMapping\": [...] }` — consumes a `resultSetId` produced by `POST /public/v1/rows/query` (mode \"materialize\"). Each `columnMapping` entry maps a source columnId onto an existing `targetColumnId` or a `createColumn` to create first.\n\n## Response\n\n- `{ \"status\": \"complete\" | \"partial\", \"createdCount\": number, \"skipped\": [{ index, reason }] }` for imports of 200 rows or fewer.\n- `{ \"status\": \"queued\", \"importSessionId\": \"...\" }` for larger imports — an IMPORT_SUCCESS/IMPORT_FAILED notification is sent when the async job finishes.","mcp":{"enabled":true,"name":"bulk_create_rows","description":"Bulk-create rows in a table from inline data or a result set"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst result = await copera.board.bulkCreateTableRows({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  source: {\n    kind: 'inline',\n    rows: [\n      { columns: [{ columnId: 'column_id_1', value: 'Lead A' }] },\n      { columns: [{ columnId: 'column_id_1', value: 'Lead B' }] },\n    ],\n  },\n});\nconsole.log(result);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"anyOf":[{"type":"string","enum":["complete"]},{"type":"string","enum":["partial"]}]},"createdCount":{"type":"number"},"skipped":{"type":"array","items":{"type":"object","properties":{"index":{"description":"Row index, or -1 for a result-set-wide issue.","type":"number"},"reason":{"type":"string"}},"required":["index","reason"]}}},"required":["status","createdCount","skipped"]},{"type":"object","properties":{"status":{"type":"string","enum":["queued"]},"importSessionId":{"description":"The import is running in the background — an IMPORT_SUCCESS or IMPORT_FAILED notification is sent to the requesting user when it finishes.","type":"string"}},"required":["status","importSessionId"]}]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/md":{"get":{"summary":"Get Row Description","tags":["API Reference","public","board","table","row"],"description":"Retrieve the markdown description of a row.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Row Description","description":"Retrieve row description content as markdown"},"content":"## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The row whose description to retrieve\n\n## Response\n\nReturns an object with a `content` field containing the markdown body of the row description.","mcp":{"enabled":true,"name":"get_row_description","description":"Get the markdown description of a row in a table"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst { content } = await copera.board.getRowDescription({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowId: 'row_id_here'\n});\nconsole.log(content);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"post":{"summary":"Update Row Description","tags":["API Reference","public","board","table","row"],"description":"Replace, append, or prepend markdown content to a row's description. Content updates are queued asynchronously.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"description":"Content operation type","anyOf":[{"type":"string","enum":["replace"]},{"type":"string","enum":["append"]},{"type":"string","enum":["prepend"]}]},"content":{"description":"Markdown content","type":"string"}},"required":["operation","content"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Update Row Description","description":"Replace, append, or prepend markdown content to a row description"},"content":"## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The row to update\n\n## Request Body\n\n- `operation` (required): One of `replace`, `append`, or `prepend`\n- `content` (required): The markdown content\n\n## Notes\n\nContent updates are processed asynchronously through a queue. The endpoint returns HTTP 202 immediately.","mcp":{"enabled":true,"name":"update_row_description","description":"Update the markdown description of a row in a table"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst result = await copera.board.updateRowDescription({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowId: 'row_id_here',\n  operation: 'replace',\n  content: '# Updated description\\nNew content here.'\n});\nconsole.log(result);"}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/column/{columnId}/md":{"get":{"summary":"Get Rich Text Column Content","tags":["API Reference","public","board","table","row","column"],"description":"Retrieve the markdown content of a RICH TEXT column cell on a row.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"columnId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Rich Text Column Content","description":"Retrieve a row's RICH TEXT column cell content as markdown"},"content":"## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The row whose cell to retrieve\n- `columnId`: The RICH TEXT column whose content to retrieve\n\n## Response\n\nReturns an object with a `content` field containing the markdown body of the rich text cell (empty string when the cell has no content).","mcp":{"enabled":true,"name":"get_rich_text_column_content","description":"Get the markdown content of a RICH TEXT column cell on a row"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst { content } = await copera.board.getRichTextColumnContent({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowId: 'row_id_here',\n  columnId: 'column_id_here'\n});\nconsole.log(content);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"post":{"summary":"Update Rich Text Column Content","tags":["API Reference","public","board","table","row","column"],"description":"Replace, append, or prepend markdown content to a RICH TEXT column cell on a row. Content updates are queued asynchronously.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"description":"Content operation type","anyOf":[{"type":"string","enum":["replace"]},{"type":"string","enum":["append"]},{"type":"string","enum":["prepend"]}]},"content":{"description":"Markdown content","type":"string"}},"required":["operation","content"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"columnId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Update Rich Text Column Content","description":"Replace, append, or prepend markdown content to a RICH TEXT column cell"},"content":"## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The row to update\n- `columnId`: The RICH TEXT column to update\n\n## Request Body\n\n- `operation` (required): One of `replace`, `append`, or `prepend`\n- `content` (required): The markdown content\n\n## Notes\n\nContent updates are processed asynchronously through a queue. The endpoint returns HTTP 202 immediately.","mcp":{"enabled":true,"name":"update_rich_text_column_content","description":"Update the markdown content of a RICH TEXT column cell on a row"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst result = await copera.board.updateRichTextColumnContent({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowId: 'row_id_here',\n  columnId: 'column_id_here',\n  operation: 'replace',\n  content: '# Section\\nNew content here.'\n});\nconsole.log(result);"}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/column/{columnId}/file/{fileId}/download":{"get":{"summary":"Download File Column Attachment","tags":["API Reference","public","board","table","row","file"],"description":"Download a FILE-column attachment from a specific row and column.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"columnId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"fileId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Download File Column Attachment","description":"Download a file attached to a row's FILE column"},"content":"## Overview\n\nDownloads a file attached to a FILE column on a specific table row. The file is only returned when the authenticated integration can access the board, table, row, and the requested `fileId` is present in that row's `columnId` cell.\n\n## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The row containing the attachment\n- `columnId`: The FILE column containing the attachment\n- `fileId`: The attachment file ID to download\n\n## Response\n\nReturns the file bytes directly with `Content-Type` and `Content-Disposition` headers. This endpoint does not return a signed URL."},"x-codeSamples":[{"lang":"curl","source":"curl -L \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -o attachment.bin \\\n  \"https://api.copera.ai/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/column/{columnId}/file/{fileId}/download\""}],"responses":{"200":{"description":"Binary file bytes. The response includes Content-Type and Content-Disposition headers.","content":{"application/json":{"schema":{"description":"Binary file bytes. The response includes Content-Type and Content-Disposition headers."}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/column/{columnId}/file":{"post":{"summary":"Upload File Column Attachment","tags":["API Reference","public","board","table","row","file"],"description":"Upload a file and attach it to a FILE column cell on a specific row. Send the request as multipart/form-data with one file part named `file`.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"format":"binary","description":"The file to upload and attach to the FILE column cell.","type":"string"}},"required":["file"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"columnId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Upload File Column Attachment","description":"Upload and attach a file to a row's FILE column"},"content":"## Overview\n\nUploads one private file and appends it to a FILE column on a table row. The authenticated integration must be able to access the board, table, and row, and `columnId` must reference a FILE column on that table.\n\n## Request\n\nSend `multipart/form-data` with one file part named `file`.\n\n## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The row receiving the attachment\n- `columnId`: The FILE column receiving the attachment\n\n## Response\n\nReturns the attached file metadata: `fileId`, `name`, `mimeType`, and `size`. Use `fileId` with the download or remove endpoints."},"x-codeSamples":[{"lang":"curl","source":"curl -X POST \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -F \"file=@./contract.pdf\" \\\n  \"https://api.copera.ai/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/column/{columnId}/file\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"}},"required":["fileId","name","mimeType","size"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/column/{columnId}/file/{fileId}":{"delete":{"summary":"Remove File Column Attachment","tags":["API Reference","public","board","table","row","file"],"description":"Remove a FILE-column attachment reference from a specific row and column. The underlying private file remains stored; only the row cell is updated.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"columnId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"fileId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Remove File Column Attachment","description":"Remove a file from a row's FILE column"},"content":"## Overview\n\nRemoves one attachment reference from a FILE column cell. This does not delete the private file record or bytes; it only detaches that `fileId` from the row.\n\n## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The row containing the attachment\n- `columnId`: The FILE column containing the attachment\n- `fileId`: The attachment file ID to remove\n\n## Response\n\nReturns `{ \"success\": true }` once the row cell is updated."},"x-codeSamples":[{"lang":"curl","source":"curl -X DELETE \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  \"https://api.copera.ai/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/column/{columnId}/file/{fileId}\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/comments":{"get":{"summary":"List Row Comments","tags":["API Reference","public","board","table","row","comment"],"description":"Retrieve all comments for a specific row with pagination and optional visibility filtering.","parameters":[{"schema":{"type":"string"},"in":"query","name":"after","required":false,"description":"Cursor for pagination (comment ID to fetch after)"},{"schema":{"type":"string"},"in":"query","name":"before","required":false,"description":"Cursor for pagination (comment ID to fetch before)"},{"schema":{"type":"string","enum":["all","internal","external"]},"in":"query","name":"visibility","required":false,"description":"Filter comments by visibility. Defaults to all. Accepted values: all, internal, external."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"List Row Comments","description":"Retrieve comments for a table row"},"content":"## Overview\n\nRetrieves all comments for a specific row in a table, with cursor-based pagination and optional visibility filtering.\n\n## Query Parameters\n\n- `after` (optional): Comment ID cursor to fetch comments after\n- `before` (optional): Comment ID cursor to fetch comments before\n- `visibility` (optional): Filter by visibility - `all`, `internal`, or `external`. Defaults to `all`.\n\n## Response\n\nReturns a paginated list of comments with:\n- Comment ID, content, and content type\n- Visibility (internal or external)\n- Author details (_id, name, picture, email)\n- Optional attachment metadata (fileId, name, mimeType, size)\n- Timestamps","mcp":{"enabled":true,"name":"list_row_comments","description":"List all comments for a table row"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst comments = await copera.board.listRowComments({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowId: 'row_id_here',\n  visibility: 'all'\n});\nconsole.log(comments);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string"},"visibility":{"anyOf":[{"type":"string","enum":["internal"]},{"type":"string","enum":["external"]}]},"author":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"picture":{"type":"string"},"email":{"type":"string"}},"required":["_id"]},"attachment":{"type":"object","properties":{"fileId":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"}},"required":["fileId","name","mimeType","size"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","contentType","visibility","author","createdAt","updatedAt"]}},"pageInfo":{"type":"object","properties":{"endCursor":{"nullable":true,"type":"string"},"startCursor":{"nullable":true,"type":"string"},"hasNextPage":{"type":"boolean"},"hasPreviousPage":{"type":"boolean"}},"required":["endCursor","startCursor","hasNextPage","hasPreviousPage"]}},"required":["items","pageInfo"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/comment/{commentId}/file/{fileId}/download":{"get":{"summary":"Download Row Comment Attachment","tags":["API Reference","public","board","table","row","comment","file"],"description":"Download an attachment from a specific row comment in board, table, row, and comment context.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"commentId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"fileId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Download Row Comment Attachment","description":"Download a file attached to a row comment"},"content":"## Overview\n\nDownloads a file attached to a specific row comment. The file is only returned when the authenticated integration can access the board, table, and row, the comment belongs to that exact context, and `fileId` matches the comment attachment.\n\n## Parameters\n\n- `boardId`: The board containing the table\n- `tableId`: The table containing the row\n- `rowId`: The row containing the comment\n- `commentId`: The comment containing the attachment\n- `fileId`: The attachment file ID to download\n\n## Response\n\nReturns the file bytes directly with `Content-Type` and `Content-Disposition` headers. This endpoint does not return a signed URL."},"x-codeSamples":[{"lang":"curl","source":"curl -L \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -o attachment.bin \\\n  \"https://api.copera.ai/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/comment/{commentId}/file/{fileId}/download\""}],"responses":{"200":{"description":"Binary file bytes. The response includes Content-Type and Content-Disposition headers.","content":{"application/json":{"schema":{"description":"Binary file bytes. The response includes Content-Type and Content-Disposition headers."}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/{rowId}/comment":{"post":{"summary":"Create Row Comment","tags":["API Reference","public","board","table","row","comment"],"description":"Add a new text comment to a specific row with visibility control.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"description":"The comment text content (HTML supported)","type":"string"},"visibility":{"type":"string","enum":["internal","external"],"description":"Comment visibility. Defaults to internal. Accepted values: internal, external."}},"required":["content"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"rowId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Create Row Comment","description":"Add a comment to a table row"},"content":"## Overview\n\nCreates a new text comment on a specific row. Comments can be internal (visible only to workspace members) or external (visible to everyone including guests).\n\n## Request Body\n\n- `content` (required): The comment text content (HTML supported)\n- `visibility` (optional): `internal` or `external`. Defaults to `internal`.\n\n## Response\n\nReturns the created comment object with author details.","mcp":{"enabled":true,"name":"create_row_comment","description":"Add a comment to a table row"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst comment = await copera.board.createRowComment({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  rowId: 'row_id_here',\n  content: 'This is a comment',\n  visibility: 'internal'\n});\nconsole.log(comment);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string"},"visibility":{"anyOf":[{"type":"string","enum":["internal"]},{"type":"string","enum":["external"]}]},"author":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"picture":{"type":"string"},"email":{"type":"string"}},"required":["_id"]},"attachment":{"type":"object","properties":{"fileId":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"}},"required":["fileId","name","mimeType","size"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","contentType","visibility","author","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/row/authenticate":{"post":{"summary":"Authenticate Table Row","tags":["API Reference","public","board","table","row","auth"],"description":"Authenticate a row using an identifier column (email, username, etc.) and a password column.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identifierColumnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"identifierColumnValue":{"type":"string"},"passwordColumnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"passwordColumnValue":{"type":"string"}},"required":["identifierColumnId","identifierColumnValue","passwordColumnId","passwordColumnValue"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Authenticate Table Row","description":"Authenticate using column values as credentials"},"content":"## Overview\n\nAuthenticate a table row by matching an identifier column value and verifying a password column.\nThis enables building custom authentication systems using board tables.\n\n## Request Body\n\n- `identifierColumnId`: The ID of the column to search by (e.g., email, username column)\n- `identifierColumnValue`: The value to match in that column\n- `passwordColumnId`: The ID of the password column\n- `passwordColumnValue`: The plaintext password to verify\n\n## Response\n\nReturns the authenticated row if credentials are valid. Password columns are masked.\n\n## Errors\n\n- 400: No row found with the provided identifier\n- 401: Invalid password","mcp":{"enabled":true,"name":"authenticate_table_row","description":"Authenticate a row using identifier and password columns"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst row = await copera.board.authenticateTableRow({\n  boardId: 'board_id_here',\n  tableId: 'table_id_here',\n  identifierColumnId: 'email_column_id',\n  identifierColumnValue: 'user@example.com',\n  passwordColumnId: 'password_column_id',\n  passwordColumnValue: 'user_password'\n});\nconsole.log(row);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"owner":{"type":"string"},"ownerName":{"description":"Display name of the row owner.","type":"string"},"table":{"type":"string"},"board":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"columnId":{"type":"string"},"value":{},"linkValue":{},"lookupValue":{"type":"array","items":{"type":"object","properties":{"foreignRowId":{"type":"string"},"foreignRowValue":{}},"required":["foreignRowId","foreignRowValue"]}},"displayValue":{"description":"Human label for the cell's raw value — resolved option label(s) for STATUS/DROPDOWN/LABELS, resolved user name(s) for USERS. Omitted when the column type has no display mapping. Always a string, an array of strings, or absent — never any other shape.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["columnId"]}}},"required":["_id","rowId","owner","table","board","createdAt","updatedAt","columns"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/board/{boardId}/table/{tableId}/export":{"post":{"summary":"Export Table View","tags":["API Reference","public","export"],"description":"Render a table view to the chosen format (CSV / XLSX / JSON / MARKDOWN / HTML / PDF / ZIP / ICS). Mirrors the GraphQL `exportTableView` mutation. Small text/spreadsheet renders return inline; large renders plus PDF/ZIP are queued through the async pipeline and return an `asyncJob` snapshot.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"boardId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"viewId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"format":{"anyOf":[{"type":"string","enum":["CSV"]},{"type":"string","enum":["XLSX"]},{"type":"string","enum":["JSON"]},{"type":"string","enum":["MARKDOWN"]},{"type":"string","enum":["HTML"]},{"type":"string","enum":["PDF"]},{"type":"string","enum":["ZIP"]},{"type":"string","enum":["ICS"]}]},"columnIds":{"type":"array","items":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}},"filter":{},"sortBy":{"type":"array","items":{"type":"object","properties":{"column":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"dir":{"description":"Sort direction","anyOf":[{"type":"string","enum":["ASC"]},{"type":"string","enum":["DESC"]}]}},"required":["column","dir"]}},"groupBy":{"type":"string"},"rowIds":{"type":"array","items":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}},"csvOptions":{"type":"object","properties":{"utf8Bom":{"type":"boolean"},"delimiter":{"type":"string"},"quoteMode":{"anyOf":[{"type":"string","enum":["AUTO"]},{"type":"string","enum":["ALL"]},{"type":"string","enum":["MINIMAL"]}]},"lineEnding":{"anyOf":[{"type":"string","enum":["LF"]},{"type":"string","enum":["CRLF"]}]}}},"pdfOptions":{"type":"object","properties":{"pageSize":{"anyOf":[{"type":"string","enum":["A4"]},{"type":"string","enum":["LETTER"]},{"type":"string","enum":["LEGAL"]},{"type":"string","enum":["A3"]},{"type":"string","enum":["TABLOID"]}]},"orientation":{"anyOf":[{"type":"string","enum":["PORTRAIT"]},{"type":"string","enum":["LANDSCAPE"]}]}}},"zipOptions":{"type":"object","properties":{"bundleInnerFormat":{"anyOf":[{"type":"string","enum":["CSV"]},{"type":"string","enum":["XLSX"]},{"type":"string","enum":["JSON"]},{"type":"string","enum":["MARKDOWN"]},{"type":"string","enum":["HTML"]},{"type":"string","enum":["PDF"]}]},"includeAttachments":{"type":"boolean"}}},"icsOptions":{"type":"object","properties":{"startDateColumnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"endDateColumnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"titleColumnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"descriptionColumnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"durationMinutes":{"type":"number"}},"required":["startDateColumnId"]},"columnOverrides":{"type":"array","items":{"type":"object","properties":{"columnId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"dateFormatChoice":{"type":"string"},"dateFormatCustom":{"type":"string"},"numberFormatChoice":{"type":"string"},"userDisplayChoice":{"type":"string"},"multiSelectDelimiter":{"type":"string"},"linkRenderingChoice":{"type":"string"},"linkedRowRenderingChoice":{"type":"string"}},"required":["columnId"]}},"includeHidden":{"type":"boolean"},"includeSystemColumns":{"type":"boolean"},"includeGroupAggregates":{"type":"boolean"},"dateFormatChoice":{"type":"string"},"dateFormatCustom":{"type":"string"},"numberFormatChoice":{"type":"string"},"userDisplayChoice":{"type":"string"},"multiSelectDelimiter":{"type":"string"},"linkRenderingChoice":{"type":"string"},"linkedRowRenderingChoice":{"type":"string"},"fileNameTemplate":{"type":"string"},"ttlDays":{"type":"number"},"forceAsync":{"type":"boolean"},"webhookUrl":{"format":"uri","type":"string"},"saveToDrive":{"description":"Save a copy in Copera Drive. Requires the ACCESS_DRIVE integration permission in addition to ACCESS_BOARDS.","type":"boolean"}},"required":["boardId","viewId"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"boardId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"tableId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Export Table View","description":"Trigger a table-view export and receive the rendered file inline (small text/spreadsheet formats) or a job handle for polling (large, PDF, or ZIP)."},"content":"## Overview\n\nThis endpoint mirrors the in-app \"Export\" dialog. Use it to script exports from your CI / data pipeline / ETL job without scraping the GraphQL surface directly.\n\n## Request body\n\nThe body shape matches the GraphQL `ExportTableViewInput` minus the path-resolved `tableId`. The most common fields:\n\n- `boardId` — required\n- `viewId` — required\n- `format` — defaults to `CSV`\n- `columnIds` — optional; when present, takes precedence over the view's visible columns\n- `webhookUrl` — optional public HTTPS URL; receives a JSON notification when the file is durable\n\n## Response\n\n- **200 OK** — Sync render. `payload` carries the rendered bytes (binary formats are base64).\n- **202 Accepted** — Async render. `asyncJob` carries the job handle; poll the `getExportJob` GraphQL query OR rely on the configured webhook. PDF and ZIP always use this path.\n- **400 Bad Request** — Validation error or missing required fields.\n- **403 Forbidden** — API key lacks `access_boards` permission or no EXPORT permission on the source board.\n- **404 Not Found** — `viewId` / `boardId` / `tableId` not found in this workspace.","mcp":{"enabled":false}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST https://api.copera.ai/public/v1/board/<boardId>/table/<tableId>/export \\\n  -H \"Authorization: Bearer <api_key>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"boardId\": \"<boardId>\",\n    \"viewId\": \"<viewId>\",\n    \"format\": \"XLSX\",\n    \"webhookUrl\": \"https://your-host.example.com/copera-export\"\n  }'"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"mimeType":{"type":"string"},"payload":{"type":"string"},"rowCount":{"type":"number"},"columns":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["_id","label","type"]}},"rows":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"columns":{}},"required":["_id","rowId","columns"]}},"asyncJob":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"format":{"type":"string"},"expiresAt":{"type":"string"},"fileName":{"nullable":true,"type":"string"},"mimeType":{"nullable":true,"type":"string"},"fileSizeBytes":{"nullable":true,"type":"number"},"rowCount":{"nullable":true,"type":"number"},"downloadUrl":{"nullable":true,"type":"string"}},"required":["jobId","status","format"]}},"required":["fileName","mimeType","payload","rowCount","columns","rows"]}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"mimeType":{"type":"string"},"payload":{"type":"string"},"rowCount":{"type":"number"},"columns":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["_id","label","type"]}},"rows":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"columns":{}},"required":["_id","rowId","columns"]}},"asyncJob":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"format":{"type":"string"},"expiresAt":{"type":"string"},"fileName":{"nullable":true,"type":"string"},"mimeType":{"nullable":true,"type":"string"},"fileSizeBytes":{"nullable":true,"type":"number"},"rowCount":{"nullable":true,"type":"number"},"downloadUrl":{"nullable":true,"type":"string"}},"required":["jobId","status","format"]}},"required":["fileName","mimeType","payload","rowCount","columns","rows"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/booking-types/":{"get":{"summary":"List booking types","tags":["API Reference","public","bookings"],"description":"Returns the workspace's booking types (event types). Requires the `access_bookings` scope.","x-mint":{"metadata":{"title":"List Booking Types","description":"Retrieve the workspace's booking types (event types)"},"content":"## Overview\n\nReturns the booking types (event types) configured in your workspace. Requires a token with the `access_bookings` scope.\n\n## Response\n\nReturns `{ bookingTypes }`. Each type includes its `_id`, title, slug, description, kind (`SOLO`, `COLLECTIVE`, `ROUND_ROBIN`), default duration, color, and the `hidden` / `active` flags.\n\nHidden and inactive types are included — this is your workspace's own configuration. Filter on the returned flags if you only want the publicly bookable ones."},"x-codeSamples":[{"lang":"curl","source":"curl -H \"Authorization: Bearer $TOKEN\" https://api.copera.ai/public/v1/booking-types"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"bookingTypes":{"type":"array","items":{"type":"object","properties":{"_id":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string"},"durationMinutes":{"type":"integer"},"color":{"type":"string"},"hidden":{"type":"boolean"},"active":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["_id","title","kind","durationMinutes","hidden","active"]}}},"required":["bookingTypes"]}}}},"400":{"description":"Bad Request - The request was invalid or cannot be served","content":{"application/json":{"schema":{"description":"Bad Request - The request was invalid or cannot be served","type":"object","properties":{"statusCode":{"type":"number","enum":[400]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/bookings/":{"get":{"summary":"List bookings","tags":["API Reference","public","bookings"],"description":"Returns the workspace's bookings, newest first, filterable by status, booking type, and start-date range. Keyset-paginated via `cursor`/`nextCursor`. Requires the `access_bookings` scope.","parameters":[{"schema":{"type":"string"},"in":"query","name":"status","required":false,"description":"Filter by lifecycle status: PENDING, CONFIRMED, DECLINED, CANCELLED, or COMPLETED."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"in":"query","name":"bookingTypeId","required":false,"description":"Filter to a single booking type by id."},{"schema":{"format":"date-time","type":"string"},"in":"query","name":"from","required":false,"description":"Only bookings starting at/after this ISO-8601 instant."},{"schema":{"format":"date-time","type":"string"},"in":"query","name":"to","required":false,"description":"Only bookings starting at/before this ISO-8601 instant."},{"schema":{"minimum":1,"maximum":100,"type":"integer"},"in":"query","name":"limit","required":false,"description":"Page size, 1-100. Defaults to 25."},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Opaque keyset cursor from a previous response's `nextCursor`."}],"x-mint":{"metadata":{"title":"List Bookings","description":"Retrieve the workspace's bookings, newest first"},"content":"## Overview\n\nReturns the bookings in your workspace, newest first. Requires a token with the `access_bookings` scope.\n\n## Pagination\n\nPass `nextCursor` from a response back as `cursor` to fetch the next page. `hasMore` is `false` on the last page.\n\n## Response\n\nReturns `{ bookings, nextCursor, hasMore }`. Each booking includes its `id`, status, start/end, duration, resolved hosts, the booker's contact details, intake answers, and the resolved location."},"x-codeSamples":[{"lang":"curl","source":"curl -H \"Authorization: Bearer $TOKEN\" \"https://api.copera.ai/public/v1/bookings?status=CONFIRMED&limit=25\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"bookings":{"type":"array","items":{"type":"object","properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"status":{"type":"string"},"bookingTypeId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"bookingTypeTitle":{"type":"string"},"start":{"format":"date-time","type":"string"},"end":{"format":"date-time","type":"string"},"durationMinutes":{"type":"integer"},"timezoneAtBooking":{"type":"string"},"hosts":{"type":"array","items":{"type":"object","properties":{"userId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"role":{"type":"string"}},"required":["userId","role"]}},"booker":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"timezone":{"type":"string"},"locale":{"type":"string"}},"required":["name","email","timezone","locale"]},"guests":{"type":"array","items":{"type":"string"}},"answers":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string"},"label":{"type":"string"},"value":{}},"required":["questionId","label","value"]}},"location":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"}},"required":["type"]},"recurringId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","status","bookingTypeId","start","end","durationMinutes","timezoneAtBooking","hosts","booker","guests","answers","location"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["bookings","nextCursor","hasMore"]}}}},"400":{"description":"Bad Request - The request was invalid or cannot be served","content":{"application/json":{"schema":{"description":"Bad Request - The request was invalid or cannot be served","type":"object","properties":{"statusCode":{"type":"number","enum":[400]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/bookings/{id}":{"get":{"summary":"Get a booking","tags":["API Reference","public","bookings"],"description":"Returns a single booking by id, scoped to the token workspace. Requires the `access_bookings` scope.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"in":"path","name":"id","required":true,"description":"The booking id returned by the Bookings API and booking webhooks. Workspace-scoped — a value not in your workspace returns NOT_FOUND."}],"x-mint":{"metadata":{"title":"Get a Booking","description":"Retrieve a single booking by id"},"content":"## Overview\n\nReturns one booking scoped to your token's workspace by the `id` returned from the Bookings API or webhook payloads. Requires a token with the `access_bookings` scope.\n\n## Webhook correlation\n\nOutbound booking webhooks carry `data.id`. Pass that value directly to this endpoint to fetch the full booking detail after receiving a webhook event.\n\n## Response\n\nReturns the booking shape: status, start/end, duration, resolved hosts, the booker's contact details, intake answers, and the resolved location. A value not in your workspace returns NOT_FOUND."},"x-codeSamples":[{"lang":"curl","source":"curl -H \"Authorization: Bearer $TOKEN\" https://api.copera.ai/public/v1/bookings/$BOOKING_ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"status":{"type":"string"},"bookingTypeId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"bookingTypeTitle":{"type":"string"},"start":{"format":"date-time","type":"string"},"end":{"format":"date-time","type":"string"},"durationMinutes":{"type":"integer"},"timezoneAtBooking":{"type":"string"},"hosts":{"type":"array","items":{"type":"object","properties":{"userId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"role":{"type":"string"}},"required":["userId","role"]}},"booker":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"timezone":{"type":"string"},"locale":{"type":"string"}},"required":["name","email","timezone","locale"]},"guests":{"type":"array","items":{"type":"string"}},"answers":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string"},"label":{"type":"string"},"value":{}},"required":["questionId","label","value"]}},"location":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"}},"required":["type"]},"recurringId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","status","bookingTypeId","start","end","durationMinutes","timezoneAtBooking","hosts","booker","guests","answers","location"]}}}},"400":{"description":"Bad Request - The request was invalid or cannot be served","content":{"application/json":{"schema":{"description":"Bad Request - The request was invalid or cannot be served","type":"object","properties":{"statusCode":{"type":"number","enum":[400]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/chat/channels":{"get":{"summary":"List Channels","tags":["API Reference","public","chat"],"description":"List channels and direct-message conversations visible to the token user.","parameters":[{"schema":{"maxLength":200,"type":"string"},"in":"query","name":"q","required":false,"description":"Case-insensitive search over channel name, custom DM name, description, and participant name/email."},{"schema":{"anyOf":[{"type":"string","enum":["category"]},{"type":"string","enum":["text"]},{"type":"string","enum":["voice"]},{"type":"string","enum":["inbox"]},{"type":"string","enum":["classroom"]},{"type":"string","enum":["meeting"]},{"type":"string","enum":["omni"]}]},"in":"query","name":"type","required":false,"description":"Filter by channel type."},{"schema":{"anyOf":[{"type":"string","enum":["group"]},{"type":"string","enum":["dm"]}]},"in":"query","name":"kind","required":false,"description":"Filter by channel kind."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"query","name":"participantId","required":false,"description":"Return channels containing this user or team participant."},{"schema":{"minimum":1,"maximum":200,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max results (1-200). Defaults to 100."},{"schema":{"minimum":0,"type":"number"},"in":"query","name":"offset","required":false,"description":"Pagination offset. Defaults to 0."}],"x-mint":{"metadata":{"title":"List Channels","description":"Discover channel and DM IDs for CLI and automation workflows"},"content":"## Query Parameters\n\n- `q` (optional): Case-insensitive search over channel name, custom DM name, description, and participant name/email.\n- `type` (optional): Filter by channel type, for example `text`, `voice`, or `meeting`.\n- `kind` (optional): `group` or `dm`.\n- `participantId` (optional): Return channels containing this user or team participant.\n- `limit` (optional): Max results, 1-200 (default: 100).\n- `offset` (optional): Pagination offset (default: 0).\n\nOnly channels visible to the token user are returned.","mcp":{"enabled":true,"name":"list_chat_channels","description":"List visible Copera chat channels and DMs"}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.ai/public/v1/chat/channels?q=deploy&kind=group\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"picture":{"type":"string"},"type":{"type":"string"},"kind":{"type":"string"},"participantUserIds":{"type":"array","items":{"type":"string"}},"participantTeamIds":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastMessageAt":{"type":"string"}},"required":["_id","name","type","kind","participantUserIds","participantTeamIds","createdBy","createdAt","updatedAt"]}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["channels","total","limit","offset"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/chat/channel":{"post":{"summary":"Create Channel","tags":["API Reference","public","chat"],"description":"Create a new text group channel. The token user becomes the channel creator and a participant.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"minLength":1,"maxLength":200,"type":"string"},"description":{"maxLength":2000,"type":"string"},"participantUserIds":{"maxItems":50,"description":"Workspace users to add as participants. The token user is always added automatically.","type":"array","items":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}},"type":{"description":"Channel type. Defaults to text.","anyOf":[{"type":"string","enum":["text"]},{"type":"string","enum":["voice"]}]}},"required":["name"]}}},"required":true},"x-mint":{"metadata":{"title":"Create Channel","description":"Create a new text group channel"},"content":"## Overview\n\nCreates a new text group channel. The token user is added as the creator; pass `participantUserIds` to add other workspace members right away.\n\nChannel creation follows the workspace's member permissions: workspaces that restrict channel creation to specific roles apply the same restriction to API tokens.\n\n## Request Body\n\n- `name` (required): Channel name (1-200 characters)\n- `description` (optional): Channel description\n- `participantUserIds` (optional): Up to 50 workspace user IDs to add as participants","mcp":{"enabled":true,"name":"create_channel","description":"Create a new Copera text group channel"}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST \"https://api.copera.ai/public/v1/chat/channel\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"launch-room\",\"description\":\"Q3 launch coordination\"}'"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"participantUserIds":{"type":"array","items":{"type":"string"}}},"required":["_id","name","participantUserIds"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/chat/channel/{channelId}/messages":{"get":{"summary":"Get Channel Messages","tags":["API Reference","public","chat"],"description":"Read recent messages from a channel or DM the token user participates in.","parameters":[{"schema":{"minimum":1,"maximum":50,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max messages to return (1-50). Defaults to 50."},{"schema":{"type":"string"},"in":"query","name":"before","required":false,"description":"Return messages before this message id."},{"schema":{"type":"string"},"in":"query","name":"after","required":false,"description":"Return messages after this message id."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"channelId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Channel Messages","description":"Read recent messages from a channel or DM"},"content":"## Overview\n\nReturns recent messages (newest first) from a channel or DM. The token user must be a participant — non-participants are rejected. Page with `before`/`after` message ids and `limit` (1-50, default 50).","mcp":{"enabled":true,"name":"get_channel_messages","description":"Read recent messages from a Copera channel or DM"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"channelId":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"authorId":{"type":"string"},"contentType":{"type":"string"},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["_id","contentType","content","createdAt"]}}},"required":["channelId","messages"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/chat/channel/{channelId}/participants":{"post":{"summary":"Add Channel Participants","tags":["API Reference","public","chat"],"description":"Add workspace users (including hired AI agents) to a channel. Requires channel admin.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"participantUserIds":{"minItems":1,"maxItems":50,"description":"Workspace user ids (including hired AI-agent actors) to add.","type":"array","items":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}}},"required":["participantUserIds"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"channelId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Add Channel Participants","description":"Add users or AI agents to a channel"},"content":"## Overview\n\nAdds up to 50 workspace users to the channel — including hired AI-agent actors, so you can staff a channel with an agent programmatically. The token user must be a channel admin.","mcp":{"enabled":true,"name":"add_channel_participants","description":"Add users or AI agents to a channel"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"channelId":{"type":"string"},"participantUserIds":{"type":"array","items":{"type":"string"}}},"required":["channelId","participantUserIds"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/chat/channel/{channelId}/participant/{participantUserId}":{"delete":{"summary":"Remove Channel Participant","tags":["API Reference","public","chat"],"description":"Remove a participant from a channel. Requires channel admin.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"channelId","required":true,"description":"ObjectId"},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"participantUserId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Remove Channel Participant","description":"Remove a user from a channel"},"content":"## Overview\n\nRemoves one participant from the channel. The token user must be a channel admin.","mcp":{"enabled":true,"name":"remove_channel_participant","description":"Remove a participant from a channel"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/chat/channel/{channelId}/archive":{"post":{"summary":"Archive Channel","tags":["API Reference","public","chat"],"description":"Archive a channel. Requires channel owner or admin. Archived channels can be restored.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"channelId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Archive Channel","description":"Archive a channel (restorable)"},"content":"## Overview\n\nArchives the channel — it disappears from the sidebar but keeps its history and can be unarchived. The token user must be the channel owner or an admin.","mcp":{"enabled":true,"name":"archive_channel","description":"Archive a Copera channel"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/chat/channel/{channelId}/unarchive":{"post":{"summary":"Unarchive Channel","tags":["API Reference","public","chat"],"description":"Restore an archived channel.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"channelId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Unarchive Channel","description":"Restore an archived channel"},"content":"## Overview\n\nRestores an archived channel to the sidebar. The token user must be the channel owner or an admin.","mcp":{"enabled":true,"name":"unarchive_channel","description":"Restore an archived Copera channel"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/chat/channel/{channelId}/send-message":{"post":{"summary":"Send Message","tags":["API Reference","public","chat"],"description":"Send a text-based message to a chat channel using its channel ID.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"message":{"minLength":1,"maxLength":10000,"type":"string"},"name":{"type":"string"}},"required":["message"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"channelId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Send Message to Channel","description":"Send a text-based message to a chat channel"},"content":"## Prerequisites\n\nBefore sending messages, ensure you have:\n- A valid API key with chat permissions\n- The channel ID where you want to send the message\n\n## Usage Notes\n\n- Messages must be between 1 and 10,000 characters\n- The `name` field is optional and will display as the sender name\n- Returns 204 No Content on success","mcp":{"enabled":true,"name":"send_chat_message","description":"Send a message to a Copera chat channel"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nawait copera.channel.sendMessage({\n  channelId: 'channel_id_here',\n  message: 'Hello from Copera.ai SDK!',\n  name: 'Bot Name' // optional\n});"}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/chat/direct-message/send-message":{"post":{"summary":"Send Direct Message","tags":["API Reference","public","chat"],"description":"Send a text-based direct message to a workspace user. Creates or reuses the DM channel.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"userId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"message":{"minLength":1,"maxLength":10000,"type":"string"}},"required":["userId","message"]}}},"required":true},"x-mint":{"metadata":{"title":"Send Direct Message","description":"Send a direct message to a workspace user by user ID"},"content":"## Usage Notes\n\n- Use `GET /public/v1/workspace/members?q=...` to discover a user's ID by name or email.\n- This endpoint creates a DM channel if one does not already exist for the sender and recipient.\n- Returns HTTP 202 with the DM `channelId` once the message has been queued.","mcp":{"enabled":true,"name":"send_direct_message","description":"Send a message to a Copera workspace user"}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST \"https://api.copera.ai/public/v1/chat/direct-message/send-message\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"userId\":\"USER_ID\",\"message\":\"Hello from the CLI\"}'"}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"channelId":{"type":"string"},"queued":{"type":"boolean"}},"required":["channelId","queued"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/docs/search":{"get":{"summary":"Search Documents","tags":["API Reference","public","docs"],"description":"Full-text search across documents accessible to the authenticated user.","parameters":[{"schema":{"type":"string"},"in":"query","name":"q","required":true,"description":"Search query string"},{"schema":{"anyOf":[{"type":"string","enum":["createdAt"]},{"type":"string","enum":["updatedAt"]}]},"in":"query","name":"sortBy","required":false,"description":"Sort field. Defaults to updatedAt."},{"schema":{"anyOf":[{"type":"string","enum":["asc"]},{"type":"string","enum":["desc"]}]},"in":"query","name":"sortOrder","required":false,"description":"Sort order. Defaults to desc."},{"schema":{"minimum":1,"maximum":50,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max results (1-50). Defaults to 20."}],"x-mint":{"metadata":{"title":"Search Documents","description":"Full-text search across accessible documents"},"content":"## Query Parameters\n\n- `q` (required): Search query string\n- `sortBy` (optional): `createdAt` or `updatedAt` (default: `updatedAt`)\n- `sortOrder` (optional): `asc` or `desc` (default: `desc`)\n- `limit` (optional): Max results, 1-50 (default: 20)\n\n## Response\n\nReturns search results with highlighted matches in title and content. Each hit includes a `parents` array with the document's ancestor chain (root to immediate parent)."},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"parents":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}},"required":["_id","title"]}},"highlight":{"type":"object","properties":{"title":{"type":"string"},"mdBody":{"type":"string"}}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id"]}},"totalHits":{"type":"number"},"query":{"type":"string"}},"required":["hits","totalHits","query"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/docs/tree":{"get":{"summary":"Document Tree","tags":["API Reference","public","docs"],"description":"Retrieve the document tree structure with nested children up to a given depth.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"in":"query","name":"parentId","required":false,"description":"Start tree from this document. Omit for root-level documents."},{"schema":{"minimum":1,"maximum":10,"type":"number"},"in":"query","name":"depth","required":false,"description":"Max nesting depth (1-10). Defaults to 3."}],"x-mint":{"metadata":{"title":"Document Tree","description":"Traverse the document hierarchy"},"content":"## Query Parameters\n\n- `parentId` (optional): Start tree from this document ID. Omit for root-level documents.\n- `depth` (optional): Max nesting depth, 1-10 (default: 3)\n\n## Response\n\nReturns a nested tree of documents with:\n- `root`: Array of top-level tree nodes, each with nested `children`\n- `totalDocs`: Total number of documents in the response\n- `truncated`: Whether the result was truncated (max 500 docs)\n- `nextParentIds`: When truncated, IDs of leaf documents that have more children — use these as `parentId` to continue fetching\n\nEach node includes a `hasChildren` flag indicating whether it has children beyond the returned depth."},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"not":{}}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","title","owner","createdAt","updatedAt","hasChildren","children"]}},"totalDocs":{"type":"number"},"truncated":{"type":"boolean"},"nextParentIds":{"type":"array","items":{"type":"string"}}},"required":["root","totalDocs","truncated"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/docs/{docId}":{"get":{"summary":"Get Document","tags":["API Reference","public","docs"],"description":"Retrieve details of a specific document using its docId.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"docId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Document Details","description":"Retrieve detailed information about a specific document"},"content":"## Parameters\n\n- `docId`: A 24-character hexadecimal ObjectId identifying the document\n\n## Response\n\nReturns the document metadata including title, icon, cover, owner, and timestamps."},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","title","owner","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"patch":{"summary":"Update Document","tags":["API Reference","public","docs"],"description":"Update document properties such as title, icon, or cover.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"New document title","type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}}}}}},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"docId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Update Document","description":"Update document properties"},"content":"## Parameters\n\n- `docId`: The document to update\n\n## Request Body\n\n- `title` (optional): New document title\n- `icon` (optional): New icon object with type and value\n- `cover` (optional): New cover object with type and value\n\n## Response\n\nReturns the updated document object."},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","title","owner","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"delete":{"summary":"Delete Document","tags":["API Reference","public","docs"],"description":"Soft-delete a document. Only the document owner can delete it.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"docId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Delete Document","description":"Soft-delete a document"},"content":"## Parameters\n\n- `docId`: The document to delete\n\n## Notes\n\n- Only the document owner can delete it\n- This is a soft-delete — the document can be recovered"},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/docs/":{"post":{"summary":"Create Document","tags":["API Reference","public","docs"],"description":"Create a new document in the workspace. Optionally nest it under a parent document.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Document title","type":"string"},"parent":{"description":"Parent document ID for nesting","pattern":"^[0-9a-fA-F]{24}$","type":"string"},"content":{"description":"Initial markdown content","type":"string"}},"required":["title"]}}},"required":true},"x-mint":{"metadata":{"title":"Create Document","description":"Create a new document"},"content":"## Request Body\n\n- `title` (required): The document title\n- `parent` (optional): Parent document ID for creating nested documents\n- `content` (optional): Initial markdown content — queued asynchronously via Hocuspocus\n\n## Response\n\nReturns the newly created document object."},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"cover":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"starred":{"type":"boolean"},"owner":{"type":"string"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","title","owner","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/docs/{docId}/md":{"get":{"summary":"Get Document Content","tags":["API Reference","public","docs"],"description":"Retrieve the markdown body of a document.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"docId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Document Content","description":"Retrieve document content as markdown"},"content":"## Parameters\n\n- `docId`: The document whose content to retrieve\n\n## Response\n\nReturns an object with a `content` field containing the markdown body of the document."},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"post":{"summary":"Update Document Content","tags":["API Reference","public","docs"],"description":"Replace, append, or prepend markdown content to a document. Content updates are queued asynchronously.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"description":"Content operation type","anyOf":[{"type":"string","enum":["replace"]},{"type":"string","enum":["append"]},{"type":"string","enum":["prepend"]}]},"content":{"description":"Markdown content","type":"string"}},"required":["operation","content"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"docId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Update Document Content","description":"Replace, append, or prepend markdown content"},"content":"## Parameters\n\n- `docId`: The document to update\n\n## Request Body\n\n- `operation` (required): One of `replace`, `append`, or `prepend`\n- `content` (required): The markdown content\n\n## Notes\n\nContent updates are processed asynchronously through a queue. The endpoint returns HTTP 202 immediately."},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/documents/generate":{"post":{"summary":"Generate Document","tags":["API Reference","public","documents"],"description":"Generate a downloadable PDF/XLSX/CSV/MARKDOWN/HTML document from authored content. Returns a signed download URL (7-day window). Content capped at 200,000 characters — use the table export pipeline for large board data.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"title":{"minLength":1,"maxLength":200,"type":"string"},"format":{"anyOf":[{"type":"string","enum":["PDF"]},{"type":"string","enum":["XLSX"]},{"type":"string","enum":["CSV"]},{"type":"string","enum":["MARKDOWN"]},{"type":"string","enum":["HTML"]}]},"markdown":{"type":"string"},"sheets":{"maxItems":10,"description":"XLSX only. Across all sheets: at most 1,000 rows, 50,000 materialized cells, and 2,097,152 serialized bytes. Each sheet supports at most 100 columns.","type":"array","items":{"additionalProperties":false,"type":"object","properties":{"name":{"minLength":1,"maxLength":31,"type":"string"},"columns":{"maxItems":100,"type":"array","items":{"additionalProperties":false,"type":"object","properties":{"header":{"minLength":1,"type":"string"},"key":{"type":"string"}},"required":["header"]}},"rows":{"maxItems":1000,"type":"array","items":{"maxProperties":100,"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["name","columns","rows"]}},"csv":{"additionalProperties":false,"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"required":["columns","rows"]},"saveToDrive":{"description":"Save a copy in Copera Drive. Requires the ACCESS_DRIVE integration permission in addition to ACCESS_BOARDS.","type":"boolean"}},"required":["title","format"]}}},"required":true},"x-mint":{"metadata":{"title":"Generate Document","description":"Generate a downloadable document from authored content"},"mcp":{"enabled":true,"name":"generate_document","description":"Generate a PDF/XLSX/CSV/Markdown/HTML document with a signed download URL"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"type":{"type":"string","enum":["copera-file-download"]},"source":{"type":"string","enum":["generated"]},"status":{"type":"string","enum":["ready"]},"fileId":{"type":"string"},"fileName":{"type":"string"},"mimeType":{"type":"string"},"format":{"anyOf":[{"type":"string","enum":["pdf"]},{"type":"string","enum":["xlsx"]},{"type":"string","enum":["csv"]},{"type":"string","enum":["markdown"]},{"type":"string","enum":["html"]}]},"sizeBytes":{"minimum":0,"type":"number"},"downloadUrl":{"format":"uri","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"driveContentId":{"type":"string"},"preview":{"type":"string"}},"required":["type","source","status","fileId","fileName","mimeType","format","sizeBytes","downloadUrl","expiresAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/drive/tree":{"get":{"summary":"Drive Tree","tags":["API Reference","public","drive"],"description":"Retrieve the drive content tree structure with nested children up to a given depth.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"in":"query","name":"parentId","required":false,"description":"Start tree from this folder. Omit for root-level contents."},{"schema":{"minimum":1,"maximum":10,"type":"number"},"in":"query","name":"depth","required":false,"description":"Max nesting depth (1-10). Defaults to 3."}],"x-mint":{"metadata":{"title":"Drive Tree","description":"Traverse the drive hierarchy"},"content":"## Query Parameters\n\n- `parentId` (optional): Start tree from this folder ID. Omit for root-level contents.\n- `depth` (optional): Max nesting depth, 1-10 (default: 3)\n\n## Response\n\nReturns a nested tree of drive contents with:\n- `root`: Array of top-level tree nodes, each with nested `children`\n- `totalItems`: Total number of items in the response\n- `truncated`: Whether the result was truncated (max 500 items)\n- `nextParentIds`: When truncated, IDs of leaf folders that have more children — use these as `parentId` to continue fetching\n\nEach node includes a `hasChildren` flag indicating whether it has children beyond the returned depth."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/drive/tree?depth=3\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"hasChildren":{"type":"boolean"},"children":{"type":"array","items":{"not":{}}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}}},"required":["_id","name","type","owner","createdAt","updatedAt","hasChildren","children"]}},"totalItems":{"type":"number"},"truncated":{"type":"boolean"},"nextParentIds":{"type":"array","items":{"type":"string"}}},"required":["root","totalItems","truncated"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/drive/search":{"get":{"summary":"Search Drive","tags":["API Reference","public","drive"],"description":"Search across files and folders accessible to the authenticated user.","parameters":[{"schema":{"type":"string"},"in":"query","name":"q","required":true,"description":"Search query string"},{"schema":{"anyOf":[{"type":"string","enum":["createdAt"]},{"type":"string","enum":["updatedAt"]}]},"in":"query","name":"sortBy","required":false,"description":"Sort field. Defaults to updatedAt."},{"schema":{"anyOf":[{"type":"string","enum":["asc"]},{"type":"string","enum":["desc"]}]},"in":"query","name":"sortOrder","required":false,"description":"Sort order. Defaults to desc."},{"schema":{"minimum":1,"maximum":50,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max results (1-50). Defaults to 20."}],"x-mint":{"metadata":{"title":"Search Drive","description":"Search across accessible files and folders"},"content":"## Query Parameters\n\n- `q` (required): Search query string\n- `sortBy` (optional): `createdAt` or `updatedAt` (default: `updatedAt`)\n- `sortOrder` (optional): `asc` or `desc` (default: `desc`)\n- `limit` (optional): Max results, 1-50 (default: 20)\n\n## Response\n\nReturns matching files and folders with metadata."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/drive/search?q=report&limit=10\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"description":"\"file\" or \"folder\"","type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","type","owner","createdAt","updatedAt"]}},"totalHits":{"type":"number"},"query":{"type":"string"}},"required":["hits","totalHits","query"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/drive/files/{fileId}":{"get":{"summary":"Get File","tags":["API Reference","public","drive"],"description":"Retrieve details of a specific file or folder using its ID.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"fileId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get File Details","description":"Retrieve detailed information about a specific file or folder"},"content":"## Parameters\n\n- `fileId`: A 24-character hexadecimal ObjectId identifying the file or folder\n\n## Response\n\nReturns the file/folder metadata including name, type, mimeType, size, owner, and timestamps."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/drive/files/60d5ec49f1b2c72d88f0a1b2\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"description":"\"file\" or \"folder\"","type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","type","owner","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/drive/files/{fileId}/download":{"get":{"summary":"Get Download URL","tags":["API Reference","public","drive"],"description":"Get a pre-signed download URL for a file. The URL is valid for a limited time.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"fileId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Download URL","description":"Get a pre-signed URL to download a file"},"content":"## Parameters\n\n- `fileId`: The file to download\n\n## Response\n\nReturns a pre-signed URL that can be used to download the file directly. The URL expires after a short period."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/drive/files/60d5ec49f1b2c72d88f0a1b2/download\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/drive/files/upload/multipart/start":{"post":{"summary":"Start Multipart Upload","tags":["API Reference","public","drive"],"description":"Initialize a multipart upload for a large file. Returns an upload ID and file key for subsequent operations.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"description":"Name of the file to upload","type":"string"},"fileSize":{"description":"File size in bytes","type":"number"},"mimeType":{"description":"MIME type of the file","type":"string"},"parentId":{"pattern":"^[0-9a-fA-F]{24}$","description":"Parent folder ID","type":"string"}},"required":["fileName","fileSize","mimeType"]}}},"required":true},"x-mint":{"metadata":{"title":"Start Multipart Upload","description":"Initialize a multipart file upload"},"content":"## Request Body\n\n- `fileName` (required): Name of the file to upload\n- `fileSize` (required): File size in bytes\n- `mimeType` (required): MIME type of the file\n- `parentId` (optional): Parent folder ID\n\n## Response\n\nReturns an `uploadId` and `fileKey` to use in subsequent presigned URL and finalize calls."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST \"https://api.copera.app/public/v1/drive/files/upload/multipart/start\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"fileName\":\"report.pdf\",\"fileSize\":10485760,\"mimeType\":\"application/pdf\"}'"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"fileKey":{"type":"string"}},"required":["uploadId","fileKey"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/drive/files/upload/multipart/presigned-urls":{"post":{"summary":"Get Presigned Upload URLs","tags":["API Reference","public","drive"],"description":"Get pre-signed URLs for uploading individual parts of a multipart upload.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"description":"Upload ID from multipart init","type":"string"},"parts":{"description":"Number of parts to upload","minimum":1,"type":"number"},"fileKey":{"description":"S3 file key from multipart init","type":"string"}},"required":["uploadId","parts","fileKey"]}}},"required":true},"x-mint":{"metadata":{"title":"Get Presigned Upload URLs","description":"Get pre-signed URLs for uploading file parts"},"content":"## Request Body\n\n- `uploadId` (required): Upload ID from the init step\n- `parts` (required): Number of parts to upload\n- `fileKey` (required): File key from the init step\n\n## Response\n\nReturns an array of pre-signed URLs with part numbers. Upload each file chunk to its corresponding URL via PUT."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST \"https://api.copera.app/public/v1/drive/files/upload/multipart/presigned-urls\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uploadId\":\"abc123\",\"parts\":3,\"fileKey\":\"user/uuid-file.pdf\"}'"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"signedUrl":{"type":"string"},"PartNumber":{"type":"number"}},"required":["signedUrl","PartNumber"]}}},"required":["parts"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/drive/files/upload/multipart/finalize":{"post":{"summary":"Finalize Multipart Upload","tags":["API Reference","public","drive"],"description":"Complete a multipart upload after all parts have been uploaded.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"description":"Upload ID from multipart init","type":"string"},"fileKey":{"description":"S3 file key from multipart init","type":"string"},"parts":{"description":"Uploaded part metadata","type":"array","items":{"type":"object","properties":{"partNumber":{"description":"Part number (1-based)","type":"number"},"eTag":{"description":"ETag returned after uploading part","type":"string"}},"required":["partNumber","eTag"]}}},"required":["uploadId","fileKey","parts"]}}},"required":true},"x-mint":{"metadata":{"title":"Finalize Multipart Upload","description":"Complete a multipart file upload"},"content":"## Request Body\n\n- `uploadId` (required): Upload ID from the init step\n- `fileKey` (required): File key from the init step\n- `parts` (required): Array of uploaded part metadata, each with `partNumber` and `eTag`\n\n## Response\n\nReturns the created file metadata."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST \"https://api.copera.app/public/v1/drive/files/upload/multipart/finalize\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uploadId\":\"abc123\",\"fileKey\":\"user/uuid-file.pdf\",\"parts\":[{\"partNumber\":1,\"eTag\":\"etag1\"},{\"partNumber\":2,\"eTag\":\"etag2\"}]}'"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"description":"\"file\" or \"folder\"","type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","type","owner","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/drive/folders":{"post":{"summary":"Create Folder","tags":["API Reference","public","drive"],"description":"Create a new folder in the drive. Optionally nest it under a parent folder.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Folder name","type":"string"},"parentId":{"pattern":"^[0-9a-fA-F]{24}$","description":"Parent folder ID","type":"string"}},"required":["name"]}}},"required":true},"x-mint":{"metadata":{"title":"Create Folder","description":"Create a new folder"},"content":"## Request Body\n\n- `name` (required): The folder name\n- `parentId` (optional): Parent folder ID for creating nested folders\n\n## Response\n\nReturns the newly created folder object."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST \"https://api.copera.app/public/v1/drive/folders\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"My Folder\"}'"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"type":{"description":"\"file\" or \"folder\"","type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"owner":{"type":"string"},"parent":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","type","owner","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/export/job/{jobId}":{"get":{"summary":"Get Export Job","tags":["API Reference","public","export"],"description":"Fetch an export job by id (requester-scoped). Returns status, file metadata, and a signed downloadUrl when COMPLETED.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"jobId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Export Job","description":"Poll export job status and download URL"},"mcp":{"enabled":true,"name":"get_export_job","description":"Fetch an export job by id; poll at most once after a queued export"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"jobId":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["PENDING"]},{"type":"string","enum":["PROCESSING"]},{"type":"string","enum":["COMPLETED"]},{"type":"string","enum":["FAILED"]},{"type":"string","enum":["CANCELLED"]}]},"format":{"anyOf":[{"type":"string","enum":["CSV"]},{"type":"string","enum":["XLSX"]},{"type":"string","enum":["JSON"]},{"type":"string","enum":["MARKDOWN"]},{"type":"string","enum":["HTML"]},{"type":"string","enum":["PDF"]},{"type":"string","enum":["ZIP"]},{"type":"string","enum":["ICS"]}]},"expiresAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"fileName":{"anyOf":[{"type":"string"},{"type":"null"}]},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"downloadUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]}},"required":["jobId","status","format","expiresAt","fileName","mimeType","fileSizeBytes","rowCount","downloadUrl"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/export/row-set":{"post":{"summary":"Export Row Set","tags":["API Reference","public","export"],"description":"Start a cross-board export from a persisted `resultSetId` handle (from POST /rows/query with mode=materialize). Always queued; poll GET /export/job/:jobId for the download URL.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"resultSetId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"format":{"anyOf":[{"anyOf":[{"type":"string","enum":["CSV"]},{"type":"string","enum":["XLSX"]},{"type":"string","enum":["JSON"]},{"type":"string","enum":["MARKDOWN"]},{"type":"string","enum":["HTML"]},{"type":"string","enum":["PDF"]},{"type":"string","enum":["ZIP"]},{"type":"string","enum":["ICS"]}]},{"type":"null"}]},"columnIds":{"anyOf":[{"type":"array","items":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}},{"type":"null"}]},"saveToDrive":{"description":"Save a copy in Copera Drive. Requires the ACCESS_DRIVE integration permission in addition to ACCESS_BOARDS.","anyOf":[{"type":"boolean"},{"type":"null"}]},"ttlDays":{"anyOf":[{"minimum":1,"maximum":90,"type":"integer"},{"type":"null"}]}},"required":["resultSetId"]}}},"required":true},"x-mint":{"metadata":{"title":"Export Row Set","description":"Export a materialized row-result-set handle"},"mcp":{"enabled":false}},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"fileName":{"type":"string"},"mimeType":{"type":"string"},"payload":{"type":"string"},"rowCount":{"type":"number"},"columns":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["_id","label","type"]}},"rows":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"rowId":{"type":"number"},"columns":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}}},"required":["_id","rowId","columns"]}},"asyncJob":{"additionalProperties":false,"type":"object","properties":{"jobId":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["PENDING"]},{"type":"string","enum":["PROCESSING"]},{"type":"string","enum":["COMPLETED"]},{"type":"string","enum":["FAILED"]},{"type":"string","enum":["CANCELLED"]}]},"format":{"anyOf":[{"type":"string","enum":["CSV"]},{"type":"string","enum":["XLSX"]},{"type":"string","enum":["JSON"]},{"type":"string","enum":["MARKDOWN"]},{"type":"string","enum":["HTML"]},{"type":"string","enum":["PDF"]},{"type":"string","enum":["ZIP"]},{"type":"string","enum":["ICS"]}]},"expiresAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"fileName":{"anyOf":[{"type":"string"},{"type":"null"}]},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"downloadUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]}},"required":["jobId","status","format","expiresAt","fileName","mimeType","fileSizeBytes","rowCount","downloadUrl"]}},"required":["fileName","mimeType","payload","rowCount","columns","rows","asyncJob"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/meeting-notes/":{"get":{"summary":"List Meeting Notes","tags":["API Reference","public","meeting-notes"],"description":"List meeting notes the token user owns or has been shared into, newest first.","parameters":[{"schema":{"maxLength":200,"type":"string"},"in":"query","name":"q","required":false,"description":"Case-insensitive search over note titles and notes."},{"schema":{"minimum":1,"maximum":100,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max results (1-100). Defaults to 30."},{"schema":{"type":"string"},"in":"query","name":"before","required":false,"description":"Return notes started before this ISO date (for paging back in time)."}],"x-mint":{"metadata":{"title":"List Meeting Notes","description":"List meeting notes visible to the token user"},"content":"## Overview\n\nReturns meeting notes (recordings with AI summaries) the token user owns or is a shared participant of, newest first. Sharing a note with a user — including a hired AI agent — is what grants access.\n\n## Query Parameters\n\n- `q` (optional): Search note titles and typed notes\n- `limit` (optional): 1-100, default 30\n- `before` (optional): ISO date — page back in time","mcp":{"enabled":true,"name":"list_meeting_notes","description":"List Copera meeting notes visible to the token"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string"},"endedAt":{"type":"string"},"hasSummary":{"type":"boolean"}},"required":["_id","title","status","startedAt","hasSummary"]}}},"required":["notes"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/meeting-notes/{noteId}":{"get":{"summary":"Get Meeting Note","tags":["API Reference","public","meeting-notes"],"description":"Get a meeting note's AI summary and, optionally, its full transcript.","parameters":[{"schema":{"type":"boolean"},"in":"query","name":"includeTranscript","required":false,"description":"Include the full transcript segments. Defaults to false."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"noteId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Get Meeting Note","description":"Read a meeting note's summary and transcript"},"content":"## Overview\n\nReturns the note's metadata and structured AI summary (markdown). Pass `includeTranscript=true` to also get the finalized transcript segments with speaker names where identified. The token user must own the note or be a shared participant.","mcp":{"enabled":true,"name":"get_meeting_note","description":"Read a Copera meeting note's summary and transcript"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string"},"endedAt":{"type":"string"},"hasSummary":{"type":"boolean"},"summary":{"description":"Structured AI summary, markdown.","type":"string"},"userNotes":{"description":"Notes typed by participants live.","type":"string"},"transcript":{"description":"Finalized transcript segments — only when includeTranscript=true.","type":"array","items":{"type":"object","properties":{"startMs":{"type":"number"},"endMs":{"type":"number"},"text":{"type":"string"},"speaker":{"type":"string"}},"required":["startMs","endMs","text"]}}},"required":["_id","title","status","startedAt","hasSummary"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/notifications/":{"get":{"summary":"List Notifications","tags":["API Reference","public","notifications"],"description":"List notifications owned by the user associated with this Personal Access Token.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"in":"query","name":"after","required":false,"description":"Return notifications after this ObjectId cursor."},{"schema":{"pattern":"^[0-9a-fA-F]{24}$","type":"string"},"in":"query","name":"before","required":false,"description":"Return notifications before this ObjectId cursor."}],"x-mint":{"metadata":{"title":"List Notifications","description":"Retrieve the token user's notifications"},"content":"## Query Parameters\n\n- `after` (optional): ObjectId cursor for newer notifications\n- `before` (optional): ObjectId cursor for older notifications\n\n## Response\n\nReturns notifications scoped to the PAT user and workspace, plus total and unread counts."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/notifications\" \\\n  -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"notifications":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"type":{"type":"string"},"owner":{"type":"string"},"workspace":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"status":{"anyOf":[{"type":"string","enum":["read"]},{"type":"string","enum":["unread"]}]},"sender":{"type":"string"},"readAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"groupCount":{"type":"number"},"groupStartedAt":{"type":"string"},"groupSenderIds":{"type":"array","items":{"type":"string"}}},"required":["_id","type","owner","workspace","data","status"]}},"unreadCount":{"type":"number"},"count":{"type":"number"}},"required":["notifications","unreadCount","count"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/notifications/{notificationId}":{"patch":{"summary":"Update Notification Status","tags":["API Reference","public","notifications"],"description":"Mark one notification as read or unread.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"New notification status.","anyOf":[{"type":"string","enum":["read"]},{"type":"string","enum":["unread"]}]}},"required":["status"]}}},"required":true},"parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"notificationId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Update Notification Status","description":"Mark a notification as read or unread"},"content":"## Request Body\n\n- `status`: `read` or `unread`\n\n## Response\n\nReturns the updated notification."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH \"https://api.copera.app/public/v1/notifications/<notificationId>\" \\\n  -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"status\":\"read\"}'"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"type":{"type":"string"},"owner":{"type":"string"},"workspace":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"status":{"anyOf":[{"type":"string","enum":["read"]},{"type":"string","enum":["unread"]}]},"sender":{"type":"string"},"readAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"groupCount":{"type":"number"},"groupStartedAt":{"type":"string"},"groupSenderIds":{"type":"array","items":{"type":"string"}}},"required":["_id","type","owner","workspace","data","status"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}},"delete":{"summary":"Delete Notification","tags":["API Reference","public","notifications"],"description":"Delete one notification owned by the token user.","parameters":[{"schema":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"type":"string"},"in":"path","name":"notificationId","required":true,"description":"ObjectId"}],"x-mint":{"metadata":{"title":"Delete Notification","description":"Delete one notification"},"content":"## Response\n\nReturns the deleted notification ID."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE \"https://api.copera.app/public/v1/notifications/<notificationId>\" \\\n  -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"}},"required":["_id"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/omni-channel/identity-tokens":{"post":{"operationId":"createOmniIdentityToken","summary":"Create an Omni widget identity token","tags":["Public API Omni Channel","public"],"description":"Creates a five-minute identity assertion for the web-widget source bound to this server API key.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"externalId":{"minLength":1,"maxLength":200,"pattern":"^[^\\u0000-\\u001F\\u007F-\\u009F]+$","description":"Must be an opaque, stable, non-PII, application-scoped identifier for the signed-in customer. Do not use email addresses, phone numbers, usernames, sequential identifiers, or raw database IDs.","type":"string"},"email":{"format":"email","maxLength":320,"type":"string"},"name":{"minLength":1,"maxLength":200,"type":"string"}},"required":["externalId"]}}},"required":true},"security":[{"omniServerApiKey":[]}],"x-mint":{"metadata":{"title":"Create Omni identity token","description":"Mint a short-lived identity assertion for an Omni widget."},"mcp":{"enabled":false}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"identityToken":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"}},"required":["identityToken","expiresAt"]}}}},"400":{"description":"Bad Request - The request was invalid or cannot be served","content":{"application/json":{"schema":{"description":"Bad Request - The request was invalid or cannot be served","type":"object","properties":{"statusCode":{"type":"number","enum":[400]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"}},"required":["message"]}}}}}}},"/public/v1/rows/query":{"post":{"summary":"Query Rows Across Boards","tags":["API Reference","public","board","row"],"description":"Find rows matching a fuzzy search and/or precise per-table filters across multiple boards, without paging through every table individually.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"description":"count: totals only. preview: totals + a small sample. materialize: totals + sample + a persisted resultSetId handle covering every matched row.","anyOf":[{"type":"string","enum":["count"]},{"type":"string","enum":["preview"]},{"type":"string","enum":["materialize"]}]},"search":{"type":"object","properties":{"query":{"minLength":1,"maxLength":500,"description":"Free-text query matched against title/description only.","type":"string"}},"required":["query"]},"tables":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"boardId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"tableId":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"},"filter":{"type":"object","properties":{"match":{"anyOf":[{"type":"string","enum":["and"]},{"type":"string","enum":["or"]}]},"conditions":{"type":"array","items":{"type":"object","properties":{"column_id":{"type":"string"},"operator":{"type":"string"},"value":{}},"required":["column_id","operator"]}}},"required":["conditions"]},"sort":{"description":"Same dialect as GET rows, e.g. \"col_a:asc,col_b:desc\".","type":"string"}},"required":["boardId","tableId"]}},"previewLimit":{"minimum":1,"maximum":50,"type":"integer"},"conversationId":{"type":"string"}},"required":["mode"]}}},"required":true},"x-mint":{"metadata":{"title":"Query Rows Across Boards","description":"Cross-board row search, count, and result-set materialization"},"content":"## Overview\n\nCombines two sources — provide either or both:\n- `search`: fuzzy match over row title/description/searchText, across every board the caller can read.\n- `tables` (≤10): precise per-table filters using the same dialect as `GET .../rows` (`{match, conditions: [{column_id, operator, value}]}`) plus an optional `sort`.\n\n## Modes\n\n- `count`: only totals — `totalCount` and a `perTable` breakdown, no rows.\n- `preview`: totals plus up to `previewLimit` (default 20, max 50) display-enriched sample rows.\n- `materialize`: totals, preview, AND a persisted `resultSetId` handle covering every matched row id (capped at 50,000 rows total — a request above that cap fails with 400 asking you to narrow the query). Later tools (bulk import, export) can load the exact row set by `resultSetId` instead of re-querying or re-transmitting thousands of rows.\n\n## Response\n\n`{ totalCount, perTable: [{boardId, tableId, count}], preview: [{boardId, tableId, row}], resultSetId?, expiresAt? }`.","mcp":{"enabled":true,"name":"query_rows","description":"Find rows across boards via fuzzy search and/or per-table filters; optionally materialize a resultSetId handle"}},"x-codeSamples":[{"lang":"javascript","label":"Node.js SDK","source":"import { CoperaAI } from '@copera.ai/sdk';\n\nconst copera = CoperaAI({\n  apiKey: 'your-api-key-here'\n});\n\nconst result = await copera.row.queryRows({\n  mode: 'materialize',\n  search: { query: 'acme corp' },\n  tables: [{\n    boardId: 'board_id_here',\n    tableId: 'table_id_here',\n    filter: { match: 'and', conditions: [{ column_id: 'col_status', operator: 'equals', value: ['opt_qualified'] }] },\n  }],\n});\nconsole.log(result.totalCount, result.resultSetId);"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"totalCount":{"description":"Total rows matched across every table + search source.","type":"number"},"perTable":{"type":"array","items":{"type":"object","properties":{"boardId":{"type":"string"},"tableId":{"type":"string"},"count":{"type":"number"}},"required":["boardId","tableId","count"]}},"preview":{"description":"Up to previewLimit display-enriched sample rows.","type":"array","items":{"type":"object","properties":{"boardId":{"type":"string"},"tableId":{"type":"string"},"row":{"additionalProperties":true,"type":"object","properties":{}}},"required":["boardId","tableId","row"]}},"resultSetId":{"description":"Present only when mode is materialize.","type":"string"},"expiresAt":{"format":"date-time","type":"string"}},"required":["totalCount","perTable","preview"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Forbidden - You don't have permission to access this resource","content":{"application/json":{"schema":{"description":"Forbidden - You don't have permission to access this resource","type":"object","properties":{"statusCode":{"type":"number","enum":[403]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/search/":{"get":{"summary":"Global Search","tags":["API Reference","public","search"],"description":"Typed global search across documents, chat messages, channels, todos, drive files, voice transcriptions, and AI chats. Results are filtered by the token's permissions.","parameters":[{"schema":{"minLength":1,"type":"string"},"in":"query","name":"q","required":true,"description":"Search query string"},{"schema":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"string","enum":["document"]},{"type":"string","enum":["channel"]},{"type":"string","enum":["channelMessage"]},{"type":"string","enum":["todo"]},{"type":"string","enum":["todoItem"]},{"type":"string","enum":["driveContent"]},{"type":"string","enum":["voiceTranscription"]},{"type":"string","enum":["aiChat"]},{"type":"string","enum":["aiChatMessage"]}]}},{"description":"Comma-separated list of entity types, e.g. 'document,channel'","type":"string"}]},"in":"query","name":"types","required":false,"description":"Restrict search to specific entity types. Accepts repeated query params or a CSV string."},{"schema":{"anyOf":[{"type":"string","enum":["createdAt"]},{"type":"string","enum":["updatedAt"]}]},"in":"query","name":"sortBy","required":false,"description":"Sort field. Defaults to updatedAt."},{"schema":{"anyOf":[{"type":"string","enum":["asc"]},{"type":"string","enum":["desc"]}]},"in":"query","name":"sortOrder","required":false,"description":"Sort order. Defaults to desc."},{"schema":{"minimum":1,"maximum":100,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max results (1-100). Defaults to 50."}],"x-mint":{"metadata":{"title":"Global Search","description":"Typed global search across all entity types"},"content":"## Query Parameters\n\n- `q` (required): Search query string\n- `types` (optional): Restrict search to specific entity types. Accepts repeated params or a CSV string. Valid values:\n  - `document` — text documents (requires ACCESS_DOCS)\n  - `channel` — chat channels (requires ACCESS_CHANNELS)\n  - `channelMessage` — chat messages (requires ACCESS_CHANNELS)\n  - `voiceTranscription` — voice meeting transcriptions (requires ACCESS_CHANNELS)\n  - `driveContent` — drive files and folders (requires ACCESS_DRIVE)\n  - `todo` — todo lists\n  - `todoItem` — individual todos\n  - `aiChat` — AI chat conversations\n  - `aiChatMessage` — messages inside AI chats\n- `sortBy` (optional): `createdAt` or `updatedAt` (default: `updatedAt`)\n- `sortOrder` (optional): `asc` or `desc` (default: `desc`)\n- `limit` (optional): Max results, 1-100 (default: 50)\n\n## Response\n\nReturns a flat list of hits. Each hit has an `entityType` discriminator and type-specific fields. All timestamps are epoch milliseconds.\n\nIf the token lacks permission for a requested entity type, the type is silently dropped. If no types remain after filtering and `types` was explicitly provided, a 403 is returned.\n\nExternal users cannot access this endpoint."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/search?q=mike&limit=20\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""},{"lang":"bash","label":"cURL (filter types)","source":"curl -X GET \"https://api.copera.app/public/v1/search?q=mike&types=document,driveContent\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""},{"lang":"typescript","label":"copera-sdk","source":"import { Copera } from \"copera-sdk\";\n\nconst copera = new Copera({ token: process.env.COPERA_TOKEN });\n\nconst results = await copera.search({\n  q: \"mike\",\n  limit: 20,\n});\n\nfor (const hit of results.hits) {\n  console.log(hit.entityType, hit._id);\n}"},{"lang":"typescript","label":"copera-sdk (filter types)","source":"import { Copera } from \"copera-sdk\";\n\nconst copera = new Copera({ token: process.env.COPERA_TOKEN });\n\nconst results = await copera.search({\n  q: \"mike\",\n  types: [\"document\", \"driveContent\"],\n  sortBy: \"updatedAt\",\n  sortOrder: \"desc\",\n  limit: 20,\n});"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"totalHits":{"type":"number"},"processingTimeMs":{"type":"number"},"hits":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"entityType":{"type":"string","enum":["document"]},"_id":{"type":"string"},"title":{"type":"string"},"mdBody":{"type":"string"},"workspace":{"type":"string"},"owner":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["entityType","_id","title","workspace","owner","createdAt","updatedAt"]},{"type":"object","properties":{"entityType":{"type":"string","enum":["channel"]},"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"workspace":{"type":"string"},"type":{"type":"string"},"kind":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["entityType","_id","name","workspace","type","createdBy","createdAt","updatedAt"]},{"type":"object","properties":{"entityType":{"type":"string","enum":["channelMessage"]},"_id":{"type":"string"},"content":{"type":"string"},"workspace":{"type":"string"},"author":{"type":"string"},"channel":{"type":"string"},"contentType":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["entityType","_id","content","workspace","author","channel","createdAt","updatedAt"]},{"type":"object","properties":{"entityType":{"type":"string","enum":["todo"]},"_id":{"type":"string"},"name":{"type":"string"},"workspace":{"type":"string"},"owner":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["entityType","_id","name","workspace","owner","createdAt","updatedAt"]},{"type":"object","properties":{"entityType":{"type":"string","enum":["todoItem"]},"_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"workspace":{"type":"string"},"owner":{"type":"string"},"list":{"type":"string"},"completed":{"type":"boolean"},"dueDate":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["entityType","_id","title","workspace","owner","list","completed","createdAt","updatedAt"]},{"type":"object","properties":{"entityType":{"type":"string","enum":["driveContent"]},"_id":{"type":"string"},"name":{"type":"string"},"workspace":{"type":"string"},"user":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["entityType","_id","name","workspace","user","type","createdAt","updatedAt"]},{"type":"object","properties":{"entityType":{"type":"string","enum":["voiceTranscription"]},"_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"transcription":{"type":"string"},"workspace":{"type":"string"},"channel":{"type":"string"},"chatSession":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["entityType","_id","title","transcription","workspace","channel","createdAt","updatedAt"]},{"type":"object","properties":{"entityType":{"type":"string","enum":["aiChat"]},"_id":{"type":"string"},"title":{"type":"string"},"workspace":{"type":"string"},"owner":{"type":"string"},"lastMessageAt":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["entityType","_id","title","workspace","owner","createdAt","updatedAt"]},{"type":"object","properties":{"entityType":{"type":"string","enum":["aiChatMessage"]},"_id":{"type":"string"},"content":{"type":"string"},"query":{"type":"string"},"reasoning":{"type":"string"},"chat":{"type":"string"},"workspace":{"type":"string"},"owner":{"type":"string"},"role":{"anyOf":[{"type":"string","enum":["user"]},{"type":"string","enum":["assistant"]}]},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["entityType","_id","content","chat","workspace","owner","role","createdAt","updatedAt"]}]}}},"required":["query","totalHits","processingTimeMs","hits"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/workspace/info":{"get":{"summary":"Workspace Info","tags":["API Reference","public","workspace"],"description":"Retrieve basic metadata about the workspace this token belongs to.","x-mint":{"metadata":{"title":"Workspace Info","description":"Get metadata about your workspace"},"content":"## Response\n\nReturns workspace metadata including name, slug, picture, description, and seat count.\n\nExternal users cannot access this endpoint."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/workspace/info\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"picture":{"type":"string"},"description":{"type":"string"},"seats":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","slug","seats","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/workspace/me":{"get":{"summary":"Current User","tags":["API Reference","public","workspace"],"description":"Retrieve the identity of the user this token belongs to.","x-mint":{"metadata":{"title":"Current User","description":"Get the identity of the authenticated user"},"content":"## Response\n\nReturns the authenticated user's identity including `_id`, `name`, `email`, picture, title, type, status, and active flag."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/workspace/me\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture":{"type":"string"},"title":{"type":"string"},"type":{"description":"User type: user, guest, integration, ai, external","type":"string"},"status":{"description":"User status: online, offline, idle, invisible","type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["_id","name","email","type","status","active","createdAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/workspace/members":{"get":{"summary":"List Workspace Members","tags":["API Reference","public","workspace"],"description":"Retrieve a paginated list of members (users) in the workspace.","parameters":[{"schema":{"type":"string"},"in":"query","name":"q","required":false,"description":"Search by name or email (case-insensitive)"},{"schema":{"minimum":1,"maximum":500,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max results (1-500). Defaults to 100."},{"schema":{"minimum":0,"type":"number"},"in":"query","name":"offset","required":false,"description":"Pagination offset. Defaults to 0."}],"x-mint":{"metadata":{"title":"List Workspace Members","description":"Retrieve workspace members"},"content":"## Query Parameters\n\n- `q` (optional): Filter by name or email (case-insensitive substring match)\n- `limit` (optional): Max results, 1-500 (default: 100)\n- `offset` (optional): Pagination offset (default: 0)\n\n## Response\n\nReturns a paginated list of members with their name, email, picture, title, type, status, and active flag.\n\nExternal users cannot access this endpoint."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/workspace/members?q=junior&limit=20\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture":{"type":"string"},"title":{"type":"string"},"type":{"description":"User type: user, guest, integration, ai, external","type":"string"},"status":{"description":"User status: online, offline, idle, invisible","type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["_id","name","email","type","status","active","createdAt"]}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["members","total","limit","offset"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/workspace/teams":{"get":{"summary":"List Workspace Teams","tags":["API Reference","public","workspace"],"description":"Retrieve a paginated list of teams in the workspace.","parameters":[{"schema":{"type":"string"},"in":"query","name":"q","required":false,"description":"Search by team name (case-insensitive)"},{"schema":{"minimum":1,"maximum":200,"type":"number"},"in":"query","name":"limit","required":false,"description":"Max results (1-200). Defaults to 100."},{"schema":{"minimum":0,"type":"number"},"in":"query","name":"offset","required":false,"description":"Pagination offset. Defaults to 0."}],"x-mint":{"metadata":{"title":"List Workspace Teams","description":"Retrieve workspace teams"},"content":"## Query Parameters\n\n- `q` (optional): Filter by team name (case-insensitive substring match)\n- `limit` (optional): Max results, 1-200 (default: 100)\n- `offset` (optional): Pagination offset (default: 0)\n\n## Response\n\nReturns a paginated list of teams, each with name, picture, participants (user IDs), and `main` flag.\n\nExternal users cannot access this endpoint."},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET \"https://api.copera.app/public/v1/workspace/teams?limit=50\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"picture":{"type":"string"},"main":{"type":"boolean"},"participants":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","main","participants","createdBy","createdAt","updatedAt"]}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["teams","total","limit","offset"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/public/v1/workspace/team":{"post":{"summary":"Create Team","tags":["API Reference","public","workspace"],"description":"Create a new team in the workspace, optionally with initial members.","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","properties":{"name":{"minLength":1,"maxLength":100,"type":"string"},"participantUserIds":{"maxItems":100,"description":"Workspace user ids to add as team members.","type":"array","items":{"pattern":"^[0-9a-fA-F]{24}$","minLength":24,"maxLength":24,"description":"ObjectId","type":"string"}}},"required":["name"]}}},"required":true},"x-mint":{"metadata":{"title":"Create Team","description":"Create a new workspace team"},"content":"## Overview\n\nCreates a new team. Team names must be unique in the workspace. Pass `participantUserIds` to add initial members. External users cannot create teams.","mcp":{"enabled":true,"name":"create_team","description":"Create a new Copera workspace team"}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"picture":{"type":"string"},"main":{"type":"boolean"},"participants":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","main","participants","createdBy","createdAt","updatedAt"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"description":"Unauthorized - Authentication is required","type":"object","properties":{"statusCode":{"type":"number","enum":[401]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"description":"Not Found - The requested resource was not found","type":"object","properties":{"statusCode":{"type":"number","enum":[404]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}},"429":{"description":"Too Many Requests - The operation's rate limit was exceeded","content":{"application/json":{"schema":{"additionalProperties":false,"description":"Too Many Requests - The operation's rate limit was exceeded","type":"object","properties":{"statusCode":{"type":"number","enum":[429]},"error":{"type":"string","enum":["Too Many Requests"]},"message":{"type":"string"},"retryAfter":{"minimum":0,"description":"Seconds until the request may be retried. Matches the Retry-After response header.","type":"integer"}},"required":["statusCode","error","message","retryAfter"]}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"description":"Internal Server Error - Something went wrong on the server","type":"object","properties":{"statusCode":{"type":"number","enum":[500]},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}}},"servers":[{"url":"https://api.copera.ai","description":"Production"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"public","description":"Public endpoints"},{"name":"internal","description":"Internal endpoints"},{"name":"Public API Automations","description":"Public API Automations"},{"name":"Public API Board","description":"Public API Board"},{"name":"Public API Export","description":"Public API for exporting table views to a chosen format."},{"name":"Public API Bookings","description":"Public API Bookings"},{"name":"Public API Bookings","description":"Public API Bookings"},{"name":"Public API Chat","description":"Public API Chat"},{"name":"Public API Docs","description":"Public API Documents"},{"name":"Public API Documents","description":"Generate downloadable documents from authored content."},{"name":"Public API Drive","description":"Public API Drive"},{"name":"Public API Export","description":"Export job status and cross-board row-set export."},{"name":"Public API Meeting Notes","description":"Public API Meeting Notes"},{"name":"Public API Notifications","description":"Public API Notifications"},{"name":"Public API Omni Channel","description":"Server identity for embedded Omni widgets"},{"name":"Public API Row","description":"Public API Row"},{"name":"Public API Search","description":"Public API Search"},{"name":"Public API Workspace","description":"Public API Workspace metadata"}]}